datasets.utils.info_utils.ExpectedMoreSplits: {'validation'}

#17
by nighteenight - opened

the original code is like
def get_c4(nsamples, seed, seqlen, tokenizer):
# Load train and validation datasets
traindata = load_dataset(
'allenai/c4',
'allenai--c4',
data_files={'train': 'en/c4-train.00000-of-01024.json.gz'},
split='train')

valdata = load_dataset(
    'allenai/c4',
    'allenai--c4',
    data_files={'validation': 'en/c4-validation.00000-of-00008.json.gz'},
    split='validation')

but when i run it , it has an erro about datasets.utils.info_utils.ExpectedMoreSplits: {'validation'}

"Has this issue been resolved? I am encountering the same problem, and I would be very grateful if you could clarify it for me! Thank you!"

u can download the data u need and split it with codes down here(i solve it in this way):

from datasets import load_dataset

data_path

data_files = {
'validation': 'your/data/path'

load as validation

data = load_dataset(
'json', # json file
data_files=data_files, # file path
split='validation'
)

print(data[0])

Sign up or log in to comment