hf jobs stats prints a snapshot
huggingface_hub 2.2.0
hf jobs stats prints the latest sample and exits
huggingface_hub 2.2.0 changes hf jobs stats. Run it on a job and you get one reading of CPU, memory and GPU, then your prompt back. It used to stream until the job finished, so a script calling it on a running job hung until it timed out.
The live view stays behind follow
huggingface_hub 2.2.0The live view is still there, behind a follow option
fetch_job_metrics in Python returns the current sample by default too
Hugging Face lists this as a breaking change, and scripts that relied on the stream can pass the follow option. The Python call fetch_job_metrics changed the same way.
Snapshots for scripts and agents
huggingface_hub 2.2.0A snapshot can print raw metrics for scripts and agents
jsonagentquietThe snapshot also comes in machine-readable formats. There's a JSON mode, an agent mode and a quiet mode, and they print the raw metrics that the Jobs API returns, instead of the table.
Logs and stats stop hanging
huggingface_hub 2.2.0Logs return on time, and stats handles finished jobs
hf jobs logs, hf spaces logsreturn without follow while the job keeps printinghf jobs statsworks when one of the listed jobs has finishedhf jobs stats --jsonprints [] when zero jobs are runningLogs without the follow option used to hang while a job kept printing, and now they return. Stats works when a listed job has finished, and its JSON output is an empty list when zero jobs are running.
Downloads
huggingface_hub 2.2.0Downloads.
Parallel downloads always use hf_xet
huggingface_hub 2.2.0In a fresh process, some snapshot_download files went over plain HTTP
In a fresh process, the first parallel downloads could see a placeholder version for hf_xet and treat it as missing, so some files in a snapshot_download skipped Xet. Every download now sees the real version.
A filter that matches zero files warns
huggingface_hub 2.2.0snapshot_download warns when a filter matches zero files
A mistyped --include pattern used to look like a successful download
snapshot_download, and the hf download command, now print a warning when your allow or ignore patterns match zero files. Until now, a typo in a pattern looked exactly like a successful download.
Offline, redirects, scheduled pushes
huggingface_hub 2.2.0Offline downloads, redirects and scheduled pushes are fixed
snapshot_downloadworks with a pinned revision/resolvekeep the port when followedCommitSchedulermakes its first scheduled pushAn offline snapshot_download with a pinned revision now works. Following a resolve redirect keeps the port number. And CommitScheduler had a race that skipped its first scheduled push, which is fixed.
HfFileSystem
huggingface_hub 2.2.0HfFileSystem.
A new repo shows up
huggingface_hub 2.2.0A repo you just created now shows up in HfFileSystem
A refresh on one path clears its cached “not found”
HfFileSystem cached "not found" results. A repo, branch or bucket you created in the same process stayed missing until you cleared the whole cache. Now a refresh on that one path clears it.
Listings are replaced
huggingface_hub 2.2.0Cached directory listings are replaced, so duplicates are gone
A refresh also drops files that were deleted
Directory listings were appended to the cache, so a listing after a find call could show duplicate entries. A refresh kept deleted files, too. Each new listing now replaces the cached one.
Empty buckets list as empty
huggingface_hub 2.2.0Listing a new empty bucket returns an empty list
It used to raise FileNotFoundError
Listing a bucket you had just created, with zero files in it, used to raise FileNotFoundError. In 2.2.0 it returns an empty list.
The hf command
huggingface_hub 2.2.0The hf command.
Windows passes patterns as typed
huggingface_hub 2.2.0On Windows, hf passes quoted patterns as typed
hf download <repo> --include "*.json" in a folder with a JSON file downloaded zero files
On Windows, the hf command expanded quoted patterns into local file names. So a download filtered to JSON files, run in a folder that held a JSON file, quietly fetched zero files. Arguments now arrive as typed.
Env files, uploads, cache cleanup
huggingface_hub 2.2.0hf reads env files as UTF‑8 and plans cache cleanup faster
--env-file, --secrets-fileread as UTF‑8, byte order mark strippedhf uploaduploads an existing path with glob characters as ishf cache prune, hf cache rmplanning no longer slows quadratically with file countEnv and secrets files are now read as UTF-8, with the byte order mark stripped. Upload takes an existing path with glob characters literally. And planning a cache cleanup no longer slows quadratically with the number of files in a revision.
hf_xet on Windows ARM64
huggingface_hub 2.2.0hf_xet now installs on Windows ARM64
On Windows ARM64 machines, Python reports the processor name in capitals, so the install rule missed it. Installing huggingface_hub there now pulls in hf_xet as well.
Exceptions
huggingface_hub 2.2.0Two exceptions change.
load_torch_model raises FileNotFoundError
huggingface_hub 2.2.0load_torch_model raises FileNotFoundError for a missing checkpoint
ValueErrormodel_index_to_eval_resultsraises ValueError on an empty listHugging Face lists this as breaking too. load_torch_model used to raise a value error when the checkpoint path didn't exist. Code that catches it is affected. And model_index_to_eval_results now raises a value error when you pass an empty list.
Release notes
huggingface_hub 2.2.0Every change is linked from the v2.2.0 release notes
The 2.2.0 release notes on GitHub link every pull request behind these changes, and they point to the Jobs guide for the new snapshot output.






















