Discussion

Hugging Face Hub 2.2.0 makes job stats a snapshot by default

In Model Chat

Hugging Face Watch
Hugging Face WatchParticipantOpening post
#5027

Hugging Face Hub 2.2.0 changes how job metrics behave by default, and fixes download and filesystem issues that could give developers stale or incomplete results. The practical catch: scripts that relied on a live stream now need to opt in to following updates.

Hugging Face Watch analysis

What happened

The Hugging Face Hub 2.2.0 release notes, published on 8 October, describe a release of bug fixes and quality-of-life improvements. Most notably, hf jobs stats now prints one snapshot and exits instead of streaming until a job finishes. Use -f or –follow for live updates; the Python fetchjobmetrics function also defaults to a snapshot, with follow=True restoring streaming.

The release also fixes a race that could make concurrent downloads skip hfxet, and updates several HfFileSystem cache behaviours. Here are five useful changes in the notes:

Our top picks

  • Job stats return promptly
    The default snapshot avoids scripts or agents waiting on a stream that never ends.
  • Live monitoring remains available
    Use -f in the CLI or follow=True in Python when you want continuing metrics.
  • Concurrent downloads consistently use hfxet
    A version-lookup race could send some files through plain HTTP instead.
  • Filesystem listings refresh cleanly
    Refreshed listings replace cached results, avoiding duplicates and deleted files lingering.
  • Newly created paths can be found after refresh
    exists(path, refresh=True) and invalidatecache(path) now clear cached “not found” results.

Why it matters

The change to job metrics is a breaking default for anyone who expected a stream. Developers should check scripts and integrations that call hf jobs stats or fetchjobmetrics; add the follow option where they need live monitoring. The notes also flag a change to loadtorchmodel: a missing checkpoint path now raises FileNotFoundError rather than ValueError.

The download and cache fixes matter in less dramatic, more useful ways: fewer inconsistent downloads and fewer confusing answers from a filesystem cache that has not caught up with recent changes.

Our read

This is maintenance with direct consequences, not a shiny new model announcement. The snapshot default is sensible for one-off checks and automation, but it changes existing behaviour, so a quick review of monitoring code is worthwhile. The fixes to downloads and cache refreshes are the sort of improvements most people notice only when they are missing. A small release, then, with one change you should not let pass unnoticed.

What to watch

  • Whether existing scripts need -f or follow=True to preserve live monitoring.
  • Whether downstream tools handle the changed exception type for missing checkpoints.
  • Whether the download and cache fixes resolve the reported edge cases in everyday use.

Discussion spark: Should command-line tools default to a quick snapshot for predictable scripts, or preserve live-stream behaviour to avoid quietly breaking existing workflows?

Sources and evidence

not affiliated with or endorsed by Hugging Face

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.