Skip to contents

Downloads the metadata the Hub generates for a dataset (<endpoint>/api/datasets/<owner>/<name>/croissant) and reads it with read_croissant(). Its record sets read through read_record_set(), which downloads the Parquet files they name from the dataset's refs/convert/parquet branch.

Usage

read_croissant_hf(repo, token = NULL)

Arguments

repo

Character: Dataset, as <owner>/<name> or hf://datasets/<owner>/<name>.

token

Optional Character: Hugging Face token, needed for gated and private datasets. NULL reads HF_TOKEN.

Value

Croissant object.

Author

EDG

Examples

if (FALSE) { # interactive()
x <- read_croissant_hf("ylecun/mnist")
x
head(read_record_set(x, "mnist", n_max = 5L))
}