Error while preparing dataset: ValueError: Couldn't cast schema because column names don't match
#1
by
funtuan
- opened
I'm trying to load a dataset using the load_dataset function in Hugging Face's Datasets library, but I'm encountering an error when trying to prepare the dataset. Specifically, the error message says:
"ValueError: Couldn't cast schema because column names don't match"
This error seems to be related to the fact that the column names in the input data don't match the column names expected by the dataset builder. The error message suggests that there is a mismatch between the expected column names and the actual column names in the input data.
I'm not sure how to fix this error. Can anyone help me understand what might be causing it and how to resolve it?
Thank you in advance for your help!
Generating train split: 270000 examples [00:03, 54514.98 exampleGenerating train split: 280000 examples [00:03, 39490.19 example Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/datasets/builder.py", line 1873, in _prepare_split_single
writer.write_table(table)
File "/usr/local/lib/python3.11/site-packages/datasets/arrow_writer.py", line 573, in write_table
self.pa_writer.write_table(pa_table, writer_batch_size)
File "pyarrow/ipc.pxi", line 525, in pyarrow.lib._CRecordBatchWriter.write_table
File "/usr/local/lib/python3.11/site-packages/fsspec/implementations/local.py", line 354, in write
return self.f.write(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 28] No space left on device
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/chenbaihan/python/hugging-esay/./stock/try.py", line 4, in <module>
dataset = load_dataset("pmoe7/SP_500_Stocks_Data-ratios_news_price_10_yrs")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/datasets/load.py", line 1797, in load_dataset
builder_instance.download_and_prepare(
File "/usr/local/lib/python3.11/site-packages/datasets/builder.py", line 890, in download_and_prepare
self._download_and_prepare(
File "/usr/local/lib/python3.11/site-packages/datasets/builder.py", line 985, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/usr/local/lib/python3.11/site-packages/datasets/builder.py", line 1746, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/usr/local/lib/python3.11/site-packages/datasets/builder.py", line 1891, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset