Dataset Viewer issue: FeaturesError
The dataset viewer is not working.
Error details:
Error code: FeaturesError
Exception: ValueError
Message: Failed to convert pandas DataFrame to Arrow Table from file hf://datasets/PatoFlamejanteTV/LocalLLaMA@5fa3d6fa71e41f2c63fd539c1d87b85e94ec32a2/posts/localllama/american_closed_models_vs_chinese_open_models_is.json.
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/split/first_rows.py", line 243, in compute_first_rows_from_streaming_response
iterable_dataset = iterable_dataset._resolve_features()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 3608, in _resolve_features
features = _infer_features_from_batch(self.with_format(None)._head())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2368, in _head
return next(iter(self.iter(batch_size=n)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2573, in iter
for key, example in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2060, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2082, in _iter_arrow
yield from self.ex_iterable._iter_arrow()
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 544, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 383, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/datasets/packaged_modules/json/json.py", line 195, in _generate_tables
raise ValueError(
ValueError: Failed to convert pandas DataFrame to Arrow Table from file hf://datasets/PatoFlamejanteTV/LocalLLaMA@5fa3d6fa71e41f2c63fd539c1d87b85e94ec32a2/posts/localllama/american_closed_models_vs_chinese_open_models_is.json.
Hi ! the full error when rerunning the pandas > arrow conversion is
ArrowInvalid: ('cannot mix struct and non-struct, non-null values', 'Conversion failed for column data with type object')
This can be fixed using the Arrow JSON type that is being added here to datasets and the Dataset Viewer: https://github.com/huggingface/datasets/pull/8027
I can try to adapt the PR to enable the Viewer for your dataset soon :)
Hi ! the full error when rerunning the pandas > arrow conversion is
ArrowInvalid: ('cannot mix struct and non-struct, non-null values', 'Conversion failed for column data with type object')This can be fixed using the Arrow JSON type that is being added here to
datasetsand the Dataset Viewer: https://github.com/huggingface/datasets/pull/8027
I can try to adapt the PR to enable the Viewer for your dataset soon :)
Hi, I'm kind of new to Hugginface and I don't really know how these stuff work, if you could do that for me I would be very grateful!