Remove deprecated local_dir_use_symlinks from snapshot_download call#78
Open
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Open
Remove deprecated local_dir_use_symlinks from snapshot_download call#78lonexreb wants to merge 1 commit intoNVlabs:mainfrom
lonexreb wants to merge 1 commit intoNVlabs:mainfrom
Conversation
scripts/download_pai.py passes local_dir_use_symlinks=False to huggingface_hub.snapshot_download. This argument was deprecated in huggingface_hub 0.21 (Feb 2024) and removed entirely in 0.34+, where calling it raises TypeError. The repo's transitive dep stack (transformers 4.57.1 requires huggingface_hub >= 0.30) is past the deprecation but not yet at removal — so the script currently warns and will fail outright when users upgrade. The argument has been redundant for years: when local_dir is provided, files are always copied/written into the directory directly (no symlink indirection through the cache), which is the same as what local_dir_use_symlinks=False used to request. Drop the argument. Signed-off-by: lonexreb <[email protected]>
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.
Summary
scripts/download_pai.pypasseslocal_dir_use_symlinks=Falsetohuggingface_hub.snapshot_download. This argument was deprecated in huggingface_hub 0.21 (Feb 2024) and removed in 0.34+, where the call now raisesTypeError.The repo's transitive dependency stack pushes huggingface_hub past the deprecation already (
transformers==4.57.1requireshuggingface_hub >= 0.30), so users see a deprecation warning today and will see an outright failure as soon as their environment moves to a newer huggingface_hub.Why redundant
When
local_diris provided,snapshot_downloadalways copies/writes files directly into that directory (no symlink indirection through the cache). That's the same behavior the now-removedlocal_dir_use_symlinks=Falseused to request. Dropping the argument is a no-op for the desired user experience.Diff
Test plan
ast.parse(open('scripts/download_pai.py').read())passes.local_dirsemantics already produce real files, not symlinks.python scripts/download_pai.py --chunk-ids 0-1 --camera camera_front_wide_120fov --calibration camera_intrinsics --labels egomotionagainst a recent huggingface_hub install and confirm files land undernvidia/PhysicalAI-Autonomous-Vehicles/.References