This code fails:
from datasets import Dataset
ds = Dataset.from_json(path_to_file)
ds.data.validate()
raises
ArrowInvalid: Column 2: In chunk 1: Invalid: Struct child array #3 invalid: Invalid: Length spanned by list offsets (4064) larger than values array (length 4063)
This causes many issues for @TevenLeScao:
To reproduce: unzip the archive and run the above code using sanity_oscar_en.jsonl
sanity_oscar_en.jsonl.zip
PS: reading using pandas and converting to Arrow works though (note that the dataset lives in RAM in this case):
ds = Dataset.from_pandas(pd.read_json(path_to_file, lines=True))
ds.data.validate()
This code fails:
raises
This causes many issues for @TevenLeScao:
mapfails because it fails to rewrite invalid arrow arraysto_dict()segfaultsTo reproduce: unzip the archive and run the above code using
sanity_oscar_en.jsonlsanity_oscar_en.jsonl.zip
PS: reading using pandas and converting to Arrow works though (note that the dataset lives in RAM in this case):