Datasets:
<class 'datasets.table.CastError'>: Couldn't cast
#12
by
BioMike
- opened
Some specific language subsets contain the column "wordlist_ratio" and should be loaded with explicit features:
features = Features({
'text': Value('string'),
'id': Value('string'),
'dump': Value('string'),
'url': Value('string'),
'date': Value('string'),
'file_path': Value('string'),
'language': Value('string'),
'language_score': Value('float64'),
'language_script': Value('string'),
'minhash_cluster_size': Value('int64'),
'top_langs': Value('string'),
'wordlist_ratio': Value('float64'),
})
Loading with default features leads to the issue:
Generating train split: 26000 examples [00:00, 42969.95 examples/s]Failed to read file '/data/huggingface-cache/hub/datasets--HuggingFaceFW--fineweb-2/snapshots/a8a99b128121a41b17d95901715603386f6b1daf/data/abs_Latn/train/000_00000.parquet' with error <class 'datasets.table.CastError'>: Couldn't cast
text: string
id: string
dump: string
url: string
date: string
file_path: string
language: string
language_score: double
language_script: string
minhash_cluster_size: int64
top_langs: string
wordlist_ratio: double
to
{'text': Value('string'), 'id': Value('string'), 'dump': Value('string'), 'url': Value('string'), 'date': Value('string'), 'file_path': Value('string'), 'language': Value('string'), 'language_score': Value('float64'), 'language_script': Value('string'), 'minhash_cluster_size': Value('int64'), 'top_langs': Value('string')}
because column names don't match
This seems to be present for some of the languages, e.g., https://huggingface.co/datasets/HuggingFaceFW/fineweb-2/viewer/dzo_Tibt?views%5B%5D=dzo_tibt_train