Datasets:

Languages:
English
Tags:
wiki
License:

Dataset Viewer issue: DatasetGenerationCastError

#3
by panda123123 - opened

The dataset viewer is not working.

Error details:

Error code:   DatasetGenerationCastError
Exception:    DatasetGenerationCastError
Message:      An error occurred while generating the dataset

All the data files must have the same columns, but at some point there are 4 new columns ({'copyright', 'solo_count', 'character', 'core_tags'}) and 1 missing columns ({'artist'}).

This happened while the csv dataset builder was generating data using

hf://datasets/Laxhar/noob-wiki/danbooru_character.csv (at revision 929c972dcc8aeecde42b7cd8931afe82cd864424)

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)
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1870, in _prepare_split_single
                  writer.write_table(table)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 622, in write_table
                  pa_table = table_cast(pa_table, self._schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2292, in table_cast
                  return cast_table_to_schema(table, schema)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2240, in cast_table_to_schema
                  raise CastError(
              datasets.table.CastError: Couldn't cast
              character: string
              copyright: string
              trigger: string
              core_tags: string
              count: int64
              solo_count: int64
              url: string
              -- schema metadata --
              pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 1061
              to
              {'artist': Value(dtype='string', id=None), 'trigger': Value(dtype='string', id=None), 'count': Value(dtype='int64', id=None), 'url': Value(dtype='string', id=None)}
              because column names don't match
              
              During handling of the above exception, another exception occurred:
              
              Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1417, in compute_config_parquet_and_info_response
                  parquet_operations = convert_to_parquet(builder)
                File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1049, in convert_to_parquet
                  builder.download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 924, in download_and_prepare
                  self._download_and_prepare(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1000, in _download_and_prepare
                  self._prepare_split(split_generator, **prepare_split_kwargs)
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1741, in _prepare_split
                  for job_id, done, content in self._prepare_split_single(
                File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1872, in _prepare_split_single
                  raise DatasetGenerationCastError.from_cast_error(
              datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
              
              All the data files must have the same columns, but at some point there are 4 new columns ({'copyright', 'solo_count', 'character', 'core_tags'}) and 1 missing columns ({'artist'}).
              
              This happened while the csv dataset builder was generating data using
              
              hf://datasets/Laxhar/noob-wiki/danbooru_character.csv (at revision 929c972dcc8aeecde42b7cd8931afe82cd864424)
              
              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)

cc @albertvillanova @lhoestq @severo .

Laxhar Dream Lab org

Hi, this repo is not designed for view through hf's viewer because every table has different headers. You may download the file directly.

Sign up or log in to comment