Unable to read dataset
I am unable to read the birdsql/bird-critic-1.0-flash-exp dataset. I get the following traceback:
KeyError Traceback (most recent call last)
Cell In[14], line 1
----> 1 dataset = load_dataset("birdsql/bird-critic-1.0-flash-exp")
3 # Print information about the dataset
4 print(dataset)
File ~/opt/anaconda3/lib/python3.9/site-packages/datasets/load.py:2556, in load_dataset(path, name, data_dir, data_files, split, cache_dir, features, download_config, download_mode, verification_mode, ignore_verifications, keep_in_memory, save_infos, revision, token, use_auth_token, task, streaming, num_proc, storage_options, trust_remote_code, **config_kwargs)
2551 verification_mode = VerificationMode(
2552 (verification_mode or VerificationMode.BASIC_CHECKS) if not save_infos else VerificationMode.ALL_CHECKS
2553 )
2555 # Create a dataset builder
-> 2556 builder_instance = load_dataset_builder(
2557 path=path,
2558 name=name,
2559 data_dir=data_dir,
2560 data_files=data_files,
2561 cache_dir=cache_dir,
2562 features=features,
2563 download_config=download_config,
2564 download_mode=download_mode,
2565 revision=revision,
2566 token=token,
2567 storage_options=storage_options,
2568 trust_remote_code=trust_remote_code,
2569 _require_default_config_name=name is None,
2570 **config_kwargs,
2571 )
2573 # Return iterable dataset in case of streaming
2574 if streaming:
File ~/opt/anaconda3/lib/python3.9/site-packages/datasets/load.py:2228, in load_dataset_builder(path, name, data_dir, data_files, cache_dir, features, download_config, download_mode, revision, token, use_auth_token, storage_options, trust_remote_code, _require_default_config_name, **config_kwargs)
2226 download_config = download_config.copy() if download_config else DownloadConfig()
2227 download_config.storage_options.update(storage_options)
-> 2228 dataset_module = dataset_module_factory(
2229 path,
2230 revision=revision,
2231 download_config=download_config,
2232 download_mode=download_mode,
2233 data_dir=data_dir,
2234 data_files=data_files,
2235 cache_dir=cache_dir,
2236 trust_remote_code=trust_remote_code,
2237 _require_default_config_name=_require_default_config_name,
2238 _require_custom_configs=bool(config_kwargs),
2239 )
2240 # Get dataset builder class from the processing script
2241 builder_kwargs = dataset_module.builder_kwargs
File ~/opt/anaconda3/lib/python3.9/site-packages/datasets/load.py:1879, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
1874 if isinstance(e1, FileNotFoundError):
1875 raise FileNotFoundError(
1876 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory. "
1877 f"Couldn't find '{path}' on the Hugging Face Hub either: {type(e1).name}: {e1}"
1878 ) from None
-> 1879 raise e1 from None
1880 else:
1881 raise FileNotFoundError(
1882 f"Couldn't find a dataset script at {relative_to_absolute_path(combined_path)} or any data file in the same directory."
1883 )
File ~/opt/anaconda3/lib/python3.9/site-packages/datasets/load.py:1824, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
1819 raise DatasetNotFoundError(
1820 msg
1821 + f". If the dataset is private or gated, make sure to log in with huggingface-cli login
or visit the dataset page at https://huggingface.co/datasets/{path} to ask for access."
1822 )
1823 else:
-> 1824 raise e
1825 if filename in [sibling.rfilename for sibling in dataset_info.siblings]: # contains a dataset script
1826 fs = HfFileSystem(endpoint=config.HF_ENDPOINT, token=download_config.token)
File ~/opt/anaconda3/lib/python3.9/site-packages/datasets/load.py:1797, in dataset_module_factory(path, revision, download_config, download_mode, dynamic_modules_path, data_dir, data_files, cache_dir, trust_remote_code, _require_default_config_name, _require_custom_configs, **download_kwargs)
1795 hf_api = HfApi(config.HF_ENDPOINT)
1796 try:
-> 1797 dataset_info = hf_api.dataset_info(
1798 repo_id=path,
1799 revision=revision,
1800 token=download_config.token,
1801 timeout=100.0,
1802 )
1803 except Exception as e: # noqa catch any exception of hf_hub and consider that the dataset doesn't exist
1804 if isinstance(
1805 e,
1806 (
(...)
1810 ),
1811 ):
File ~/opt/anaconda3/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py:119, in validate_hf_hub_args.._inner_fn(*args, **kwargs)
116 if check_use_auth_token:
117 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.name, has_token=has_token, kwargs=kwargs)
--> 119 return fn(*args, **kwargs)
File ~/opt/anaconda3/lib/python3.9/site-packages/huggingface_hub/hf_api.py:2293, in HfApi.dataset_info(self, repo_id, revision, timeout, files_metadata, token)
2291 hf_raise_for_status(r)
2292 data = r.json()
-> 2293 return DatasetInfo(**data)
File ~/opt/anaconda3/lib/python3.9/site-packages/huggingface_hub/hf_api.py:792, in DatasetInfo.init(self, **kwargs)
790 self.likes = kwargs.pop("likes")
791 self.paperswithcode_id = kwargs.pop("paperswithcode_id", None)
--> 792 self.tags = kwargs.pop("tags")
793 card_data = kwargs.pop("cardData", None) or kwargs.pop("card_data", None)
794 self.card_data = (
795 DatasetCardData(**card_data, ignore_metadata_errors=True) if isinstance(card_data, dict) else card_data
796 )
KeyError: 'tags'
Hi @trdinger ,
Thank you for your interest in the BIRD-CRITIC work. I have confirmed that with datasets==3.2.0, the data downloads without any issues. Could you please try configuring your environment using the setup provided in our GitHub repository? You can find the instructions and baseline environment details here:
https://github.com/bird-bench/BIRD-CRITIC-1/tree/main/baseline
Please let me know if you encounter any further issues or have any questions.
A colleague and myself are both getting the same KeyError.
@xia01ongLi I have the same issue (with datasets==3.2.0)
>>> from datasets import load_dataset
>>> ds = load_dataset("birdsql/bird-critic-1.0-flash-exp")
README.md: 100%|
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/load.py", line 2129, in load_dataset
builder_instance = load_dataset_builder(
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/load.py", line 1849, in load_dataset_builder
dataset_module = dataset_module_factory(
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/load.py", line 1731, in dataset_module_factory
raise e1 from None
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/load.py", line 1696, in dataset_module_factory
).get_module()
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/load.py", line 1026, in get_module
standalone_yaml_path = cached_path(
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/datasets/utils/file_utils.py", line 180, in cached_path
).resolve_path(url_or_filename)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 179, in resolve_path
repo_and_revision_exist, err = self._repo_and_revision_exist(repo_type, repo_id, revision)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/hf_file_system.py", line 127, in _repo_and_revision_exist
self._api.repo_info(repo_id, revision=revision, repo_type=repo_type, timeout=HF_HUB_ETAG_TIMEOUT)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2491, in repo_info
return method(
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 2366, in dataset_info
return DatasetInfo(**data)
File "/opt/anaconda3/envs/ds/lib/python3.10/site-packages/huggingface_hub/hf_api.py", line 799, in __init__
self.tags = kwargs.pop("tags")
KeyError: 'tags'
Hi @gaetangate and @trdinger ,
We just updated our requirements.txt file https://github.com/bird-bench/BIRD-CRITIC-1/blob/main/requirements.txt
Could you please first try setting up the environment with the following steps?
conda create -n bird_critic python=3.10 -y
conda activate bird_critic
pip install -r requirements.txt
We’ve confirmed that this method successfully downloads the required data.
If you’re still having trouble, please try updating huggingface_hub to the latest version. (According to this discussion https://discuss.huggingface.co/t/issue-with-huggingface-load-dataset/134809)
If that doesn’t resolve the problem, feel free to email us( [email protected]), and we’ll send you the data.
If you have any further questions, feel free to let us know.
Thanks!