Error when load_dataset
When load dataset from huggingface:
data = load_dataset('togethercomputer/RedPajama-Data-1T')
I encounter the below error.
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 179 (char 178)
May I know how to fix it?
This appears to be due to corrupted files or network failures. But in general, I don't think it's a good idea to load everything at once (and I think it will fail because common crawl has different columns than the other slices). Please try downloading this data and load them locally.
This appears to be due to corrupted files or network failures. But in general, I don't think it's a good idea to load everything at once (and I think it will fail because common crawl has different columns than the other slices). Please try downloading this data and load them locally.
I've faced the same problem. The whole dataset is downloaded locally.
Seems like changing the loader behaviour would be a workaround for now/
Simply changing the loader code fixes the issue. By default this code is available at (not sure about the hash, but it should be available in the error message)^
~/.cache/huggingface/modules/datasets_modules/datasets/togethercomputer--RedPajama-Data-1T/f6a522113e38d25a5ef7f5f2fdbcf81b668b3db7caa7b6d02addfc729e403941/RedPajama-Data-1T.py
so it does not raise an exception.
E.g. changing the last line of code from
raise e
to
continue
Of course the corrupted file will not be processed in this case, it will be simply ignored.