Skip to content

Update dependency huggingface-hub to v2.2.0 - #19

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/huggingface-hub-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/huggingface-hub-2.x

Conversation

@renovate

@renovate renovate Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
huggingface-hub ==2.1.1 → ==2.2.0 age confidence

Release Notes

huggingface/huggingface_hub (huggingface-hub)

v2.2.0: [v2.2.0] hf jobs stats snapshots, download and HfFileSystem fixes

Compare Source

A small release this week, mostly bug fixes and quality-of-life improvements. hf jobs stats now returns right away instead of streaming forever, concurrent downloads reliably use hf_xet, and HfFileSystem caching is more predictable. Two behavior changes are listed under Breaking changes.

📊 hf jobs stats prints a snapshot by default

hf jobs stats used to stream metrics until the job finished, so scripts and agents calling it on a running job hung until their own timeout. It now prints the latest sample of each job once and exits, like hf jobs logs and hf spaces logs. Use -f/--follow for the previous live view. Snapshot output also supports --format json|agent|quiet, which outputs the raw API metrics.

On the Python side, HfApi.fetch_job_metrics gets the same follow parameter as fetch_job_logs. It defaults to False and returns only the current sample. Pass follow=True to stream until the job completes.

>>> hf jobs stats 6ac3bd9afbc85ba6823a9ad4
JOB ID                CPU % NUM CPU MEM % MEM USAGE      NET I/O         GPU UTIL % GPU MEM % GPU MEM USAGE
--------------------- ----- ------- ----- -------------- --------------- ---------- --------- -------------
6ac3bd9afbc85ba682... 0%    2.0     0.01% 1.0MB / 16.0GB 0.0bps / 0.0bps N/A        N/A       N/A
Hint: Use `hf jobs stats -f celinah/6ac3bd9afbc85ba6823a9ad4` to follow live stats.

# Stream live stats until the job completes
>>> hf jobs stats -f 6ac3bd9afbc85ba6823a9ad4
>>> from huggingface_hub import fetch_job_metrics
>>> for metrics in fetch_job_metrics(job_id=job.id, follow=True):
...     print(metrics)

Other Jobs fixes in this release: hf jobs logs and hf spaces logs without -f no longer hang while the job keeps printing, hf jobs stats no longer fails when one of the requested jobs has finished, and hf jobs stats --json prints [] when no job is running.

📚 Documentation: Jobs guide

⚡ Concurrent downloads always use hf_xet

In a fresh process, the first concurrent hf_hub_download calls could read a placeholder version for hf_xet while another thread was still looking it up. Those calls treated hf_xet as missing and downloaded through the plain HTTP path. This mostly affected parallel downloads such as snapshot_download, where some of the files skipped Xet. The version lookup is now cached only once it is resolved, so every download sees the real value.

📂 HfFileSystem cache fixes

Three fixes to how HfFileSystem caches listings and missing paths:

  • ls() on a newly created empty bucket returns an empty list instead of raising FileNotFoundError.
  • Directory listings are now replaced in the cache instead of appended to. Before, ls() after find() or ls(refresh=True) could return duplicate entries, refresh=True kept deleted files, and listing a single bucket file cached it as the whole folder's listing.
  • exists(path, refresh=True) and invalidate_cache(path) now clear cached "not found" results. Before, a repo, branch or bucket created in the same process stayed missing until a full invalidate_cache().
>>> fs.exists(repo_id)
False
>>> api.create_repo(repo_id)
>>> fs.exists(repo_id, refresh=True)  # was False before this release
True

💔 Breaking changes

  • hf jobs stats and HfApi.fetch_job_metrics return a single snapshot by default instead of streaming until the job completes. Use -f/--follow or follow=True to keep the previous behavior. See the section above (#​5090).

  • load_torch_model now raises FileNotFoundError instead of ValueError when the checkpoint path does not exist, and model_index_to_eval_results raises ValueError on an empty list (#​5063).

  • [Bugfix] Fix wrong exception type and unbound variable guard by @​vector15-05 in #​5063

🖥️ CLI

  • [CLI] Don't glob-expand arguments on Windows by @​hanouticelina in #​5117. On Windows, quoted patterns such as --exclude ".venv/**" or --include "*.json" were expanded into local file names before reaching the command. hf download <repo> --include "*.json" in a folder containing a .json file silently downloaded nothing.
  • [CLI] Read --env-file / --secrets-file as UTF-8 and strip the BOM by @​hanouticelina in #​5066
  • [CLI] Upload existing paths with glob characters as-is in hf upload by @​Ganesh2325 in #​5059

🔧 Other QoL improvements

  • [Download] Warn when allow/ignore patterns match no files in snapshot_download by @​Ad1th in #​5067
  • [Cache] Speed up delete_revisions with a set lookup by @​hanouticelina in #​5118. Planning hf cache prune / hf cache rm no longer scales quadratically with the number of files per revision.
  • [Setup] Install hf-xet on Windows ARM64 by @​angt in #​5074

🐛 Bug and typo fixes

📖 Documentation

🏗️ Internal


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cc2db400-3a30-4503-aa14-b3980ec3663e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants