Commit 4ac989d
authored
pip: bump huggingface-hub from 1.24.0 to 1.26.0 (#2140)
Bumps [huggingface-hub](https://github.com/huggingface/huggingface_hub)
from 1.24.0 to 1.26.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/huggingface/huggingface_hub/releases">huggingface-hub's
releases</a>.</em></p>
<blockquote>
<h2>[v1.26.0] Resolve revisions only once, security hardening, and
resource groups for Jobs & Collections</h2>
<h2>📌 Pin a revision once with <code>resolve_revision</code></h2>
<p>Libraries that download many files one by one (config, weights,
tokenizer, processor, ...) had to resolve
<code>revision="main"</code> into a commit hash on every call
— costing one HTTP request per file and risking two calls landing on two
different commits if the repo is updated in between. The new <a
href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_api#huggingface_hub.HfApi.resolve_revision"><code>HfApi.resolve_revision</code></a>
resolves the revision once and returns a <code>ResolvedRevision</code>:
a <code>str</code> subclass whose value stays the user-facing revision
(so error messages keep saying <code>"main"</code>) while its
<code>.resolved</code> attribute holds the commit hash. Download helpers
(<code>hf_hub_download</code>, <code>snapshot_download</code>,
<code>get_cached_repo_tree</code>) detect it and use the commit hash
directly, guaranteeing every file comes from the same commit. The
mapping is also written to the <code>refs/</code> folder of the cache,
so later runs in offline mode transparently fall back to the cached
value.</p>
<pre lang="py"><code>>>> from huggingface_hub import
resolve_revision, hf_hub_download
>>> revision =
resolve_revision("openai-community/gpt2")
>>> revision
ResolvedRevision(initial=None,
resolved='607a30d783dfa663caf39e06633721c8d4cfcd7e')
>>> revision == "main" # readable error messages
True
>>> config = hf_hub_download("openai-community/gpt2",
"config.json", revision=revision)
>>> weights =
hf_hub_download("openai-community/gpt2",
"model.safetensors", revision=revision)
</code></pre>
<p>📚 <strong>Documentation:</strong> <a
href="https://huggingface.co/docs/huggingface_hub/main/en/guides/manage-cache#pin-a-revision-advanced">Manage
the cache — Pin a revision (advanced)</a></p>
<ul>
<li>[Download] Add HfApi.resolve_revision and ResolvedRevision by <a
href="https://github.com/Wauplin"><code>@Wauplin</code></a> in <a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4604">#4604</a></li>
</ul>
<h2>🔒 Security hardening for downloads and sandboxes</h2>
<p>This release ships two security fixes. First, downloading or
uploading to a <code>--local-dir</code> now rejects absolute,
drive-relative, root-relative, UNC and <code>..</code>-traversal
filenames on <strong>all</strong> platforms, interpreting each name
under both POSIX and Windows rules (refs CVE-2026-15717). Previously
only a Windows-only <code>..\</code> check existed, so a malicious repo
could write files outside the target directory on Windows clients — and
even leak a NetNTLMv2 hash via UNC paths. Legitimate repo filenames
never contain such segments, so real downloads are unaffected; note that
exotic names like <code>folder/..\..\..\file</code>, previously
tolerated on Linux, are now rejected everywhere. Second,
<code>Sandbox.create</code> no longer injects your HF token into the job
environment to download the <code>sbx-server</code> binary: the bucket
is public, so the bootstrap now downloads it anonymously and no HF
credential ever lands in the sandbox unless you explicitly opt in with
<code>forward_hf_token=True</code>.</p>
<ul>
<li>[Download] Reject absolute/UNC/traversal filenames on local_dir
& cache paths by <a
href="https://github.com/Wauplin"><code>@Wauplin</code></a> in <a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4540">#4540</a></li>
<li>[Sandbox] Don't send the HF token to sandbox jobs by <a
href="https://github.com/Wauplin"><code>@Wauplin</code></a> in <a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4583">#4583</a></li>
</ul>
<h2>🗂️ Resource groups for Jobs and Collections</h2>
<p>Organization resource groups are now supported across the client. For
collections, <code>create_collection</code> accepts an optional
<code>resource_group_id</code>, and the new
<code>update_collection_resource_group</code> method wraps the dedicated
Hub endpoint to assign a collection to a resource group afterwards
(passing <code>None</code> removes it). For Jobs, <code>run_job</code>,
<code>run_uv_job</code> and <code>create_scheduled_job</code> accept a
<code>resource_group_id</code> parameter, mirrored by a
<code>--resource-group-id</code> option on the <code>hf jobs run</code>,
<code>hf jobs uv run</code> and <code>hf jobs scheduled run</code>
commands. Beyond access control within an organization, resource groups
are also used for cost attribution and per-group spending limits.</p>
<pre lang="bash"><code>hf jobs run --resource-group-id <group-id>
python:3.12 python train.py
</code></pre>
<p>📚 <strong>Documentation:</strong> <a
href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/collections">Collections
reference</a>, <a
href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/cli">CLI
reference</a></p>
<ul>
<li>Support resource groups for collections by <a
href="https://github.com/moon-bot-app"><code>@moon-bot-app</code></a>[bot]
in <a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4575">#4575</a></li>
<li>feat(jobs): support resource group at Job creation by <a
href="https://github.com/moon-bot-app"><code>@moon-bot-app</code></a>[bot]
in <a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4576">#4576</a></li>
</ul>
<h2>📊 Job names, front and center in the CLI</h2>
<p>Job names are now much easier to work with from the terminal.
<code>hf jobs ls</code> (and <code>hf jobs scheduled ls</code>) display
a dedicated <code>NAME</code> column, and a new <code>--name</code>
filter acts as a shortcut for <code>--label name=NAME</code>. The name
is also surfaced as a top-level field in <code>hf jobs inspect</code>
and in command results, instead of only living inside
<code>labels</code> — where it remains for compatibility.</p>
<pre lang="console"><code>$ hf jobs ls -a --name training-v2
JOB_ID NAME IMAGE/SPACE COMMAND CREATED STATUS RUNTIME
----------- ------------ ----------- ------------ ------------ ---------
-------
6a60b190... training-v2 python:3.12 python -c... 2026-07-2... COMPLETED
0s
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/c998254dea1266086dae7d723a4b77308a314e77"><code>c998254</code></a>
Release: v1.26.0</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/8a8909793e8f641a70bf5a303835d5ef25b9a7fd"><code>8a89097</code></a>
Release: v1.26.0.rc2</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/ac1c66b4e4b031e7f84eced4c9055f8132837e7f"><code>ac1c66b</code></a>
Release: v1.26.0.rc1</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/9c594e6b078582d8f54746e752cae2824e22fdda"><code>9c594e6</code></a>
Release: v1.26.0.rc0</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/5af012a4e3168a0a77d012f9750358cb981c44c2"><code>5af012a</code></a>
[Core] Fix tilde expansion in CommitOperationAdd (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4612">#4612</a>)</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/da90367226d05a95854e978041a618f0c85c192e"><code>da90367</code></a>
[CLI] Don't crash when stdout can't encode non-ASCII output (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4610">#4610</a>)</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/a782edfaf511c98c8c4e41fa8cdb20c0939dc2ac"><code>a782edf</code></a>
[Download] Add HfApi.resolve_revision and ResolvedRevision (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4604">#4604</a>)</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/59df95f9441872aa3d32ac0a2059fedb7df9ad73"><code>59df95f</code></a>
Reject <code>token=False</code> in
<code>create_inference_endpoint_from_catalog</code> (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4605">#4605</a>)</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/a1028f87396b92a3895ea373ef7c25101d3c1757"><code>a1028f8</code></a>
[Safetensors] Fix truncated header on 100kb boundary (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4603">#4603</a>)</li>
<li><a
href="https://github.com/huggingface/huggingface_hub/commit/bbdef5b34d166a622891775c03ab0a4755b88280"><code>bbdef5b</code></a>
[Download] Reject redacted Xet hashes from tree cache (<a
href="https://redirect.github.com/huggingface/huggingface_hub/issues/4595">#4595</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/huggingface/huggingface_hub/compare/v1.24.0...v1.26.0">compare
view</a></li>
</ul>
</details>
<br />
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>1 parent a73c95b commit 4ac989d
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments