Datasets:

ArXiv:
License:

issue in downloading the dataset..

#1
by bsmani - opened

train_ds = load_dataset("CrowdAILab/scicap", field="annotations")
this is my code i am getting this error ---------------------------------------------------------------------------
CastError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/datasets/builder.py in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1988 try:
-> 1989 writer.write_table(table)
1990 except CastError as cast_error:

8 frames
CastError: Couldn't cast
id: int64
paragraph: list<item: string>
child 0, item: string
image_id: int64
mention: list<item: list<item: string>>
child 0, item: list<item: string>
child 0, item: string
to
{'caption': Value(dtype='string', id=None), 'image_id': Value(dtype='int64', id=None), 'id': Value(dtype='int64', id=None), 'caption_no_index': Value(dtype='string', id=None), 'paragraph': Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), 'mention': Sequence(feature=Sequence(feature=Value(dtype='string', id=None), length=-1, id=None), length=-1, id=None)}
because column names don't match

During handling of the above exception, another exception occurred:

DatasetGenerationCastError Traceback (most recent call last)
/usr/local/lib/python3.10/dist-packages/datasets/builder.py in _prepare_split_single(self, gen_kwargs, fpath, file_format, max_shard_size, job_id)
1989 writer.write_table(table)
1990 except CastError as cast_error:
-> 1991 raise DatasetGenerationCastError.from_cast_error(
1992 cast_error=cast_error,
1993 builder_name=self.info.builder_name,

DatasetGenerationCastError: An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 2 missing columns ({'caption_no_index', 'caption'})

This happened while the json dataset builder was generating data using

hf://datasets/CrowdAILab/scicap/hide_test.json (at revision cdc5cf0fffa663f66bdf9400d6a82c9d05b74869)

Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations) how to clear this please help me..

Sign up or log in to comment