unstale

pypi / huggingface-hub

huggingface-hub

What changed in huggingface-hub 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-20.

5 breaking2 new APIs and options2 performance1 behavior and defaults1 tooling16 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

huggingface-hub 227 changes

Breaking changes 5

  • Prints one snapshot and exits by default instead of streaming until the job completes; use -f/--follow for live stats.

    2.2.0release notes

  • Listing a newly created empty bucket returns an empty list instead of raising FileNotFoundError.

    2.2.0release notes

  • Raises FileNotFoundError instead of ValueError when the checkpoint path does not exist.

    2.2.0release notes

  • Raises ValueError when given an empty list.

    2.2.0release notes

  • The CLI command was renamed from hf spaces zero-gpu-quota to hf spaces zero-gpu quota.

    2.1.1release notes

New APIs and options 2

  • Snapshot output supports json, agent, and quiet formats, which output the raw API metrics.

    2.2.0release notes

  • Adds a follow parameter defaulting to False, so the method returns the current sample; pass True to stream until the job completes.

    2.2.0release notes

Performance 2

  • Planning cache pruning no longer scales quadratically with the number of files per revision.

    2.2.0release notes

  • Planning cache removal no longer scales quadratically with the number of files per revision.

    2.2.0release notes

Behavior and default changes 1

  • Warns when allow or ignore patterns match no files.

    2.2.0release notes

Tooling 1

Fixes and other changes 16

  • Fixes a race that could skip the first scheduled push.

    2.2.0release notes

  • The CLI reads the file as UTF-8 and strips the BOM.

    2.2.0release notes

  • On Windows, quoted glob patterns are no longer expanded into local file names before reaching the command.

    2.2.0release notes

  • Without -f, logs no longer hang while the job keeps printing.

    2.2.0release notes

  • Prints [] when no job is running.

    2.2.0release notes

  • No longer fails when one of the requested jobs has finished.

    2.2.0release notes

  • Without -f, logs no longer hang while the job keeps printing.

    2.2.0release notes

  • Uploads existing paths containing glob characters as-is.

    2.2.0release notes

  • Concurrent downloads now see the resolved version, preventing parallel downloads from incorrectly skipping Xet.

    2.2.0release notes

  • With refresh=True, clears cached not-found results so newly created repos, branches, or buckets are recognized.

    2.2.0release notes

  • Clears cached not-found results for the specified path, so newly created repos, branches, or buckets are recognized.

    2.2.0release notes

  • Directory listings replace cached listings rather than append, avoiding duplicates, stale deleted files, and incorrect bucket-folder listings.

    2.2.0release notes

  • Card validation now respects the configured endpoint.

    2.2.0release notes

  • Redirect handling now considers the port.

    2.2.0release notes

  • The CLI reads the file as UTF-8 and strips the BOM.

    2.2.0release notes

  • Works offline with a pinned revision.

    2.2.0release notes