huggingface_hub 2.2.0: hf jobs stats prints a snapshot, and parallel downloads always use hf_xet

3 days ago

What changed in huggingface_hub 2.2.0: hf jobs stats prints one snapshot and exits, parallel downloads always use hf_xet, HfFileSystem caching fixes, Windows fixes for the hf command, and a new exception from load_torch_model. https://github.com/huggingface/huggingface_hub/releases/tag/v2.2.0 https://github.com/huggingface/huggingface_hub/compare/v2.1.1...v2.2.0

Ask

Ask about this presentation

Answers are generated from this presentation.

Chapters

  1. 0:00hf jobs stats prints a snapshot
  2. 0:16The live view stays behind follow
  3. 0:27Snapshots for scripts and agents
  4. 0:39Logs and stats stop hanging
  5. 0:52Downloads
  6. 0:53Parallel downloads always use hf_xet
  7. 1:06A filter that matches zero files warns
  8. 1:19Offline, redirects, scheduled pushes
  9. 1:31HfFileSystem
  10. 1:33A new repo shows up
  11. 1:45Listings are replaced
  12. 1:58Empty buckets list as empty
  13. 2:07The hf command
  14. 2:08Windows passes patterns as typed
  15. 2:24Env files, uploads, cache cleanup
  16. 2:39hf_xet on Windows ARM64
  17. 2:51Exceptions
  18. 2:53load_torch_model raises FileNotFoundError
  19. 3:09Release notes
Show transcript

hf jobs stats prints a snapshot

0102030405hf jobs
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5090
Hugging Face

huggingface_hub 2.2.0

hf jobs stats prints the latest sample and exits

Released October 8, 2026Listed as breaking

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.0
0102030405hf jobs
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5090

The 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.0
0102030405hf jobs
huggingface/huggingface_hub · GitHub release v2.2.0

A snapshot can print raw metrics for scripts and agents

jsonagentquiet

The 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.0
0102030405hf jobs
huggingface/huggingface_hub · GitHub release v2.2.0

Logs return on time, and stats handles finished jobs

hf jobs logs, hf spaces logsreturn without follow while the job keeps printing
hf jobs statsworks when one of the listed jobs has finished
hf jobs stats --jsonprints [] when zero jobs are running

Logs 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.0
0102030405Downloads
02
Downloads

Downloads.

Parallel downloads always use hf_xet

huggingface_hub 2.2.0
0102030405Downloads
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5102

In 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.0
0102030405Downloads
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5067

snapshot_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.0
0102030405Downloads
huggingface/huggingface_hub · GitHub release v2.2.0

Offline downloads, redirects and scheduled pushes are fixed

Offline snapshot_downloadworks with a pinned revision
Redirects from /resolvekeep the port when followed
CommitSchedulermakes its first scheduled push

An 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.0
0102030405HfFileSystem
03
HfFileSystem

HfFileSystem.

A new repo shows up

huggingface_hub 2.2.0
0102030405HfFileSystem
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5106

A 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.0
0102030405HfFileSystem
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5099

Cached 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.0
0102030405HfFileSystem
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5097

Listing 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.0
0102030405The hf command
04
The hf command

The hf command.

Windows passes patterns as typed

huggingface_hub 2.2.0
0102030405The hf command
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5117

On 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.0
0102030405The hf command
huggingface/huggingface_hub · GitHub release v2.2.0

hf reads env files as UTF‑8 and plans cache cleanup faster

--env-file, --secrets-fileread as UTF‑8, byte order mark stripped
hf uploaduploads an existing path with glob characters as is
hf cache prune, hf cache rmplanning no longer slows quadratically with file count

Env 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.0
0102030405The hf command
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5074

hf_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.0
0102030405Exceptions
05
Exceptions

Two exceptions change.

load_torch_model raises FileNotFoundError

huggingface_hub 2.2.0
0102030405Exceptions
huggingface/huggingface_hub · GitHub release v2.2.0 · PR #5063

load_torch_model raises FileNotFoundError for a missing checkpoint

BeforeValueError
model_index_to_eval_resultsraises ValueError on an empty list

Hugging 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.0
0102030405Release notes
huggingface/huggingface_hub · GitHub release v2.2.0

Every 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.