Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] KeyError: 'tags' caused by dependency package #7634

Open
Ucag opened this issue Feb 1, 2025 · 0 comments
Open

[Bug] KeyError: 'tags' caused by dependency package #7634

Ucag opened this issue Feb 1, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@Ucag
Copy link

Ucag commented Feb 1, 2025

What happened?

KeyError: 'tags' caused by dependency package.

Steps to reproduce

When use
HotPotQA, following error raises

from dspy.datasets import HotPotQA
HotPotQA()

Error

...(more tracebacks are ignored)
File /opt/miniconda3/lib/python3.12/site-packages/huggingface_hub/hf_api.py:2366, in HfApi.dataset_info(self, repo_id, revision, timeout, files_metadata, token)
   2364 hf_raise_for_status(r)
   2365 data = r.json()
-> 2366 return DatasetInfo(**data)

File /opt/miniconda3/lib/python3.12/site-packages/huggingface_hub/hf_api.py:799, in DatasetInfo.__init__(self, **kwargs)
    797 self.likes = kwargs.pop("likes")
    798 self.paperswithcode_id = kwargs.pop("paperswithcode_id", None)
--> 799 self.tags = kwargs.pop("tags")
    800 card_data = kwargs.pop("cardData", None) or kwargs.pop("card_data", None)
    801 self.card_data = (
    802     DatasetCardData(**card_data, ignore_metadata_errors=True) if isinstance(card_data, dict) else card_data
    803 )

KeyError: 'tags'

After some search, it causes by the datasets upstream package huggingface_hub which could be outdated using the version constraint in pyproject.toml, which is "datasets>=2.14.6,<3.0.0". For more details, please see this link

For avoiding issue like this, is it better to add latest huggingface_hub as dependence?

DSPy version

2.6.0

@Ucag Ucag added the bug Something isn't working label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant