Repository navigation
Studio: read the prequant source etag from the repo blob under the shared Hub blob store - #14819
Merged
Merged
Conversation
…ared Hub blob store huggingface_hub 1.32+ links <repo>/blobs/<etag> on to a cache-wide <cache>/blobs/<xx>/<xet hash> store, so the realpath basename of a snapshot file is the Xet hash, not the etag, and every online lookup was reported stale. Follow the link chain only until it enters <repo>/blobs. Legacy and copied (no symlink) layouts are unchanged.
Member
Author
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
danielhanchen
added a commit
that referenced
this pull request
Oct 23, 2026
… (#14878) Two files merged at 02:46 UTC without the repo formatter, so pre-commit.ci's `ruff-format-with-kwargs` hook (which runs on all files) will rewrite them on every PR queued after that: - `studio/install_python_stack.py` from #14834 - `studio/backend/tests/test_diffusion_prequant_cache.py` from #14819 Same class as #14817 and #14852. `python scripts/run_ruff_format.py` (the hook's entry point, `ruff==0.6.9`) applied to those two files. Both parse to identical ASTs before and after, `ruff check` passes, and a full run of the hook over every tracked Python file on this branch changes nothing else.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
huggingface_hub 1.32 and later store Xet downloads once per cache, in
<cache>/blobs/<xx>/<xet hash>, and turn each<repo>/blobs/<etag>entry into a relative link to that store. This is on by default, and Studio requireshuggingface-hub>=1.32.0.The prequant cache took the realpath basename of a snapshot file as the source ETag. Under the new layout that basename is the 64-hex Xet hash, which also passes the content-hash check, so every online lookup compared it against the real ETag and reported the cache stale: the first load wrote a checkpoint that later loads never used, and every load re-read and re-quantized the dense weights.
The fix follows the snapshot link chain only until it enters
<repo>/blobsand uses that name. The legacy layout and the copied-file layout (Windows without symlinks) resolve exactly as before.Tests: the new cases in
test_diffusion_prequant_cache.pybuild the shared layout with the hub's ownpublish_blob_to_shared_store(or by hand on older hubs). They fail on main and pass here (55 passed).