v1.2.0
Breaking Changes📦 huggingface-hubView on GitHub →
⚠ 1 breaking✨ 8 features🐛 6 fixes🔧 13 symbols
Summary
This release significantly enhances rate limit handling with automatic retries and clearer errors, introduces the daily papers endpoint, and adds OVHcloud as a new Inference Provider. It also includes a breaking change where several access request listing functions now return iterators instead of lists.
⚠️ Breaking Changes
- Paginated results from `list_pending_access_requests`, `list_accepted_access_requests`, and `list_rejected_access_requests` now return an iterator instead of a list. To maintain previous behavior, wrap the call with `list(...)`.
Migration Steps
- If you rely on the return type of `list_pending_access_requests`, `list_accepted_access_requests`, or `list_rejected_access_requests` being a list, wrap the call with `list(...)` to maintain the old behavior: e.g., `list(list_pending_access_requests(...))`.
- Use `huggingface_hub.is_offline_mode()` instead of checking `HF_HUB_OFFLINE` directly.
- When using `InferenceClient.feature_extraction`, ensure `truncation_direction` parameters use lowercase values ("left"/"right").
✨ New Features
- Improved rate limit handling: SDK now automatically parses `RateLimit` headers during 429 errors, waits the specified duration, and provides clearer error messages showing retry time and remaining requests.
- Added `list_daily_papers` endpoint to programmatically access Hugging Face's daily papers feed with filtering and sorting capabilities.
- Introduced `huggingface_hub.is_offline_mode()` as the recommended utility to check if offline mode is enabled, replacing direct checks of `HF_HUB_OFFLINE`.
- Inference Endpoints now support configuring scaling metrics and thresholds during deployment.
- Exposed `RepoFile` and `RepoFolder` at the root level for easier imports.
- Added OVHcloud AI Endpoints as an official Inference Provider.
- Added support for Automatic Speech Recognition (ASR) via the Replicate Inference Provider.
- A new top-level alias `hffs` is available for convenient access to the `HfFileSystem` interface.
🐛 Bug Fixes
- Fixed zero-shot classification output parsing in Inference.
- Resolved `FileNotFoundError` during CLI update checks.
- Fixed `HfHubHTTPError` reduction error by adding a factory function.
- Made 'name' optional in catalog deploy.
- Prevented use of `rich` in the tiny-agents CLI.
- Used `constants.HF_HUB_ETAG_TIMEOUT` as the timeout for `get_hf_file_metadata`.