Datasets:

Modalities:
Tabular
Text
Formats:
parquet
Languages:
code
ArXiv:
Libraries:
Datasets
Dask
License:

How to replicate file structure locally

#30
by jsaizant - opened

I am trying to download the dataset locally while replicating the file structure (data/python/xxx.parquet). I have tried the "load_dataset" and "save_to_disk" functions together, and also wget, but none worked for me. Does anyone know how?

from datasets import load_dataset
dataset = load_dataset(".", data_dir="./data/python")

... assuming that you've already downloaded the parquet files into the a data directory in your working directory. I think that will load it and put it into the hugging face cache directory.

Otherwise, if you want it to download and put into cache directly:
load_dataset("bigcode/the-stack", data_dir="data/python", split="train")

Sign up or log in to comment