-
Notifications
You must be signed in to change notification settings - Fork 3k
Support huggingface_hub v0.x and v1.x #7783
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
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
| "fsspec[http]>=2023.1.0,<=2025.9.0", | ||
| # To get datasets from the Datasets Hub on huggingface.co | ||
| "huggingface-hub>=0.24.0", | ||
| "huggingface-hub>=0.25.0,<2.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bumping to 0.25.0 to be able to use update_repo_settings in tests. Honestly not a big breaking change IMO (dates back to Sept. 2024)
|
@lhoestq could you have a look at this PR please? It makes The CI is currently failing because of 429 rate limit errors but otherwise everything should be fine (made extensive local and ci tests to ensure that). Let me know if you notice anything weird. PR is ready to be merged "as-is" in my opinion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm !
Related to huggingface/huggingface_hub#3340.
This PR adapts
datasetsto be compatible with both huggingface_hub v0.x and v1.x.In practice nothing else should change (I've checked the codebase). The
HfHubHTTPErroris a base error defined inhuggingface_hubthat inherits fromrequests.HTTPErrorin v0.x and will inherit fromhttpx.HTTPErrorin v1.x. It has been introduced ~2 years ago so it's fine to use it right now (i.e. no need to wait for v1.x release or bump minimal version).Most of the changes have been around the test suite to make sure that tests are passing with both
requestsandhttpxbackends. Mid-term it would be good to completely remove therequestsdependency fromdatasetsbut that's an orthogonal topic.