v1.21.0.rc0
Breaking Changes📦 huggingface-hubView on GitHub →
⚠ 2 breaking✨ 4 features🐛 5 fixes⚡ 1 deprecations🔧 6 symbols
Summary
The Jobs listing functionality was significantly overhauled, introducing server-side filtering and lazy pagination for `list_jobs()`, and renaming the CLI command from `hf jobs ps` to `hf jobs ls`. A critical circular import bug affecting `huggingface_hub.login` was also resolved.
⚠️ Breaking Changes
- `list_jobs()` now returns an `Iterable[JobInfo]` instead of `list[JobInfo]`. If you indexed the result (`jobs[0]`), you must now wrap the call with `list(...)` to materialize the results immediately.
- The CLI option `-f`/`--filter` in `hf jobs ls` is deprecated. Filtering by glob patterns, negation, or by `id`/`image`/`command` is no longer supported; use `--status` and `--label` instead.
Migration Steps
- If you relied on indexing the result of `list_jobs()` (e.g., `jobs[0]`), change this to `list(list_jobs())[0]` or iterate over the result.
- Replace usage of `-f`/`--filter` in CLI job listing commands with `--status` and `--label` arguments.
✨ New Features
- Jobs listing API now supports server-side filtering via `status` and `labels` parameters in `list_jobs()`.
- `list_jobs()` now returns a lazy iterator, fetching results page by page.
- The CLI command `hf jobs ps` has been renamed to `hf jobs ls` for consistency, though `ps` and `list` remain as aliases.
- Added `--limit` option to `hf jobs ls` for pagination control.
🐛 Bug Fixes
- Fixed a regression causing `ImportError` on `from huggingface_hub import login` due to a circular dependency.
- Requests now retry on `httpx.RemoteProtocolError`.
- Fixed `IndexError` in `filter_repo_objects` when provided with an empty allow/ignore pattern.
- Excluded skipped string tensors from single-shard index during serialization.
- Fixed `ty`/`mypy` errors related to click 8.4.2 in the CLI.
Affected Symbols
⚡ Deprecations
- The CLI option `-f`/`--filter` in `hf jobs ls` is deprecated in favor of `--status` and `--label`.