Datasets:
GAIR
/

Languages:
English
ArXiv:
Libraries:
License:

DatasetGenerationError

#4
by zwhe99 - opened

Error code: DatasetGenerationError
Exception: TypeError
Message: Couldn't cast array of type
struct<char_num_after_normalized: int64, contain_at_least_two_stop_words: bool, ellipsis_line_ratio: double, idx: int64, language_detection_score: double, lines_start_with_bullet_point_ratio: double, mean_length_of_alpha_words: double, non_alphabetical_char_ratio: double, path: string, symbols_to_words_ratio: double, uppercase_word_ratio: double>
to
{'id': Value(dtype='string', id=None), 'language_detection_score': Value(dtype='float64', id=None)}
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2011, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, 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 2302, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2261, in cast_table_to_schema
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2261, in
arrays = [cast_array_to_feature(table[name], feature) for name, feature in features.items()]
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1802, in wrapper
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 1802, in
return pa.chunked_array([func(chunk, *args, **kwargs) for chunk in array.chunks])
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2122, in cast_array_to_feature
raise TypeError(f"Couldn't cast array of type\n{_short_str(array.type)}\nto\n{_short_str(feature)}")
TypeError: Couldn't cast array of type
struct<char_num_after_normalized: int64, contain_at_least_two_stop_words: bool, ellipsis_line_ratio: double, idx: int64, language_detection_score: double, lines_start_with_bullet_point_ratio: double, mean_length_of_alpha_words: double, non_alphabetical_char_ratio: double, path: string, symbols_to_words_ratio: double, uppercase_word_ratio: double>
to
{'id': Value(dtype='string', id=None), 'language_detection_score': Value(dtype='float64', id=None)}

          The above exception was the direct cause of the following exception:
          
          Traceback (most recent call last):
            File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1524, in compute_config_parquet_and_info_response
              parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
            File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1099, in stream_convert_to_parquet
              builder._prepare_split(
            File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, 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 2038, in _prepare_split_single
              raise DatasetGenerationError("An error occurred while generating the dataset") from e
          datasets.exceptions.DatasetGenerationError: An error occurred while generating the dataset

Sign up or log in to comment