fix(download): expand user tilde in download-hf-snapshot.py - #5559
Open
vaibhavsrv wants to merge 1 commit into
Open
vaibhavsrv wants to merge 1 commit into
vaibhavsrv wants to merge 1 commit into
Conversation
vaibhavsrv
force-pushed
the
fix/download-hf-snapshot-expand-tilde
branch
from
September 17, 2026 04:46
cf3637e to
bfc0bf5
Compare
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.
Why this matters
In
ods/scripts/download-hf-snapshot.py, the CLI argumentcache_dirwas typed asPathwithout expanding user tildes. Supplying a path such as~/modelscausedcache_dir.mkdir()to create a literal~directory in the current working directory.Call
.expanduser().resolve()oncache_dirprior to directory creation, matching path resolution standards across ODS download scripts.Validation
~in the repository root.test_download_hf_snapshot_user_tilde.pyconfirmscache_direxpands user paths without creating a literal~folder.Overlap check
Searched live open/closed PRs by
download-hf-snapshot.py. #5402 handles offline backend checks; this hardens cache directory argument parsing.Risk / AI disclosure
AI-assisted investigation, implementation and CLI regressions. This strengthens CLI path resolution. Independent review remains a gate.
Follow-up integration evidence
Composed with #5402 at 3c186f3 without conflicts. Snapshot downloading checks remain intact.
Backlog composition was local-only (production/test diffs, excluding workflow/Makefile wiring); it is not an upstream merge or independent human approval. Declared live-review gates remain open.