KeyError when trying to load_dataset("squad_v2")
#4
by
janspoerer
- opened
The minimal working example to load the SQuAD v2 dataset using
from datasets import load_dataset
dataset_squad_v2 = load_dataset("squad_v2")
does not work on my Ubuntu 22 machine due to a KeyError().
lib/python3.9/site-packages/datasets/features/features.py in generate_from_dict(obj)
1282
1283 if class_type == Sequence:
-> 1284 return Sequence(feature=generate_from_dict(obj["feature"]), length=obj["length"])
1285
1286 field_names = {f.name for f in fields(class_type)}
KeyError: 'length'
Is there a way to remedy this issue?
I've noticed that it works when switching from Python 3.9 to Python 3.10. Is there a way to get this to run with Python 3.9 as well?