Datasets:

ArXiv:
License:

how to load specific file

#11
by yiranBai - opened

hey I want to load part of 'RU' dataset, and based on the given example in datasets doc
c4_subset = load_dataset("allenai/c4", data_files="en/c4-train.0000*-of-01024.json.gz")
I try to load some 'RU' dataset by this line
raw_datasets = load_dataset("oscar-corpus/OSCAR-2201",use_auth_token=True, data_files="compressed/ru_meta/ru_meta_part_1.jsonl.gz")

but it fails, and says

FileNotFoundError: Unable to find 'https://huggingface.co/datasets/oscar-corpus/OSCAR-2201/resolve/main/compressed/ru_meta/ru_meta_part_1.jsonl.gz' at /mnt/cephfs2/projects/dialogue/LLM/https:/huggingface.co/datasets/oscar-corpus/OSCAR-2201/resolve/main

then I try to make the path in data_files more clear
base_url ='https://huggingface.co/datasets/oscar-corpus/OSCAR-2201/resolve/cf681196b4d42e72eb40fd4f9e4c7657c87e5154/' raw_datasets = load_dataset("oscar-corpus/OSCAR-2201",use_auth_token=True, data_files={'train':base_url + "compressed/ru_meta/ru_meta_part_1.jsonl.gz"})

Eror still occurs and says
TypeError: __init__() missing 1 required positional argument: 'language'

Then I try to add language='ru'
raw_datasets = load_dataset("oscar-corpus/OSCAR-2201",use_auth_token=True, language='ru' data_files={'train':base_url + "compressed/ru_meta/ru_meta_part_1.jsonl.gz"})

It starts to download all of the ru dataset which is not what I want.

So my question is how can I download part of dataset for specific language dir

maybe you should use your token like this:
usr_token = 'hyslkdjsdfjojioj'
raw_datasets = load_dataset("oscar-corpus/OSCAR-2201",use_auth_token=usr_token , data_files="compressed/ru_meta/ru_meta_part_1.jsonl.gz")

maybe you should use your token like this:
usr_token = 'hyslkdjsdfjojioj'
raw_datasets = load_dataset("oscar-corpus/OSCAR-2201",use_auth_token=usr_token , data_files="compressed/ru_meta/ru_meta_part_1.jsonl.gz")

It seems an error occurred: " required positional argument: 'language' ".

In my case(Korean),

dataset_ko = load_dataset("oscar-corpus/OSCAR-2201",
                        token=HUGGINGFACE_API_KEY, # required
                        language="ko", 
                        streaming=False,
                        trust_remote_code=True,
                        data_files="compressed/ko_meta/ko_meta_part_1.jsonl.gz")

But it starts to download all too.

I have a same problem. :(

I recommend downloading directly from the file tab.

Sign up or log in to comment