Datasets:
GAIR
/

Languages:
English
Size Categories:
1B<n<10B
ArXiv:
License:

CastError on dataset loading

#2
by ari9dam - opened

ds = datasets.load_dataset("GAIR/MathPile_Commercial", cache_dir="/mnt/huggingface_cache/", split="train")

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:

DatasetGenerationError Traceback (most recent call last)

GAIR org

Currently, we recommend that you download it locally from the command line (such as huggingface-cli) instead of the python function load_dataset("GAIR/MathPile_Commercial") (due to a possible network issue), unpack the gz file, and then load the jsonl file. Some commands that might be helpful are as follows

$ huggingface-cli download --resume-download --repo-type dataset GAIR/MathPile_Commercial --local-dir /your/path/ --local-dir-use-symlinks False

$ cd /your/path/
$ find . -type f -name "*.gz" -exec gzip -d {} \;

Later we will also support the datasets loading via load_dataset("GAIR/MathPile_Commercial"). Stay tuned.

Sign up or log in to comment