Datasets:

Modalities:
Text
Formats:
json
ArXiv:
DOI:
Libraries:
Datasets
Dask

`KeyError: 'name'` when trying to load dataset

#3
by gmukobi - opened

Steps to repro:

  1. Fill out the form to get gated access to the dataset.
  2. Load the dataset with datasets:
from datasets import load_dataset
dataset = load_dataset("allenai/paloma")

Error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\load.py", line 2556, in load_dataset
    builder_instance = load_dataset_builder(
                       ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\load.py", line 2228, in load_dataset_builder
    dataset_module = dataset_module_factory(
                     ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\load.py", line 1879, in dataset_module_factory
    raise e1 from None
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\load.py", line 1861, in dataset_module_factory
    ).get_module()
      ^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\load.py", line 1230, in get_module
    dataset_infos = DatasetInfosDict.from_dataset_card_data(dataset_card_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\info.py", line 455, in from_dataset_card_data
    {
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\info.py", line 456, in <dictcomp>
    dataset_info_yaml_dict.get("config_name", "default"): DatasetInfo._from_yaml_dict(
                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\info.py", line 394, in _from_yaml_dict
    yaml_data["features"] = Features._from_yaml_list(yaml_data["features"])
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\features\features.py", line 1875, in _from_yaml_list
    return cls.from_dict(from_yaml_inner(yaml_data))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\features\features.py", line 1870, in from_yaml_inner
    names = [_feature.pop("name") for _feature in obj]
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gabe\anaconda3\envs\ais\Lib\site-packages\datasets\features\features.py", line 1870, in <listcomp>
    names = [_feature.pop("name") for _feature in obj]
             ^^^^^^^^^^^^^^^^^^^^
KeyError: 'name'

Thanks for noting this! This has been resolved in our most recent update.

IanMagnusson changed discussion status to closed

Sign up or log in to comment