Error when loading queries

#1
by isacat - opened

When trying to run the following code snippet, I get a datasets.builder.DatasetGenerationError:

import datasets
queries = datasets.load_dataset('irds/wikiclir_de', 'queries')

Full stack trace:

Generating queries split: 0 examples [00:00, ? examples/s]
Traceback (most recent call last):
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 1693, in _prepare_split_single
    example = self.info.features.encode_example(record) if self.info.features is not None else record
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/features/features.py", line 1852, in encode_example
    return encode_nested_example(self, example)
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/features/features.py", line 1229, in encode_nested_example
    {
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/features/features.py", line 1229, in <dictcomp>
    {
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 323, in zip_dict
    yield key, tuple(d[key] for d in dicts)
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/utils/py_utils.py", line 323, in <genexpr>
    yield key, tuple(d[key] for d in dicts)
KeyError: 'text'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/load.py", line 2153, in load_dataset
    builder_instance.download_and_prepare(
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 954, in download_and_prepare
    self._download_and_prepare(
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 1717, in _download_and_prepare
    super()._download_and_prepare(
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 1049, in _download_and_prepare
    self._prepare_split(split_generator, **prepare_split_kwargs)
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 1555, in _prepare_split
    for job_id, done, content in self._prepare_split_single(
  File "/home/isa/workspace/mteb-long-documents/mteb-venv/lib/python3.10/site-packages/datasets/builder.py", line 1712, in _prepare_split_single
    raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.builder.DatasetGenerationError: An error occurred while generating the dataset

Sign up or log in to comment