Replace deprecated huggingface-cli with hf - #607
Open
Ben Younes (ousamabenyounes) wants to merge 1 commit into
Open
Replace deprecated huggingface-cli with hf#607Ben Younes (ousamabenyounes) wants to merge 1 commit into
Ben Younes (ousamabenyounes) wants to merge 1 commit into
Conversation
`huggingface-cli` was removed from recent huggingface_hub releases; the current CLI entry point is `hf`. The documented `-hr/--hf-repo` download flow therefore fails with "command not found". Update the download command in setup_env.py and the matching README / gpu/README instructions to use `hf download`, which takes the same arguments. Adds a stdlib-unittest regression test asserting the download command uses `hf`. Fixes microsoft#560 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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
huggingface-cliwas removed from recenthuggingface_hubreleases; the current CLI entry point ishf.setup_env.pystill shells out tohuggingface-cli downloadfor the-hr/--hf-repoflow, so that documented path now fails withcommand not found.This migrates every non-submodule reference to the current
hfCLI:setup_env.py— the model download commandREADME.md(two manual-download examples) andgpu/README.mdhf download <repo> --local-dir <path>takes the same arguments as the legacyhuggingface-cli download, so the swap is behavior-preserving on supportedhuggingface_hubversions.Test verification (RED → GREEN)
Added
tests/test_setup_env_download.py(stdlibunittest, no new dependency), which drivesprepare_model()and asserts the download command useshf.RED — on unmodified
main(before the fix):GREEN — with the fix: