Repository navigation
fix(cli): use supported Hub token lookup for aLoRA uploads - #1798
Merged
planetf1 merged 2 commits intoNov 16, 2026
Merged
Conversation
Replace removed HfFolder calls with get_token and preserve authentication errors during intrinsic-upload cleanup. Add offline import and authentication regressions for all three upload paths. Assisted-by: Codex Signed-off-by: Alex Shuvalov <[email protected]>
planetf1
reviewed
Nov 9, 2026
Recommend HF_TOKEN or hf auth login in all three missing-token errors and assert the exact guidance in offline upload regressions. Assisted-by: Codex Signed-off-by: Alex Shuvalov <[email protected]>
This was referenced Nov 12, 2026
planetf1
approved these changes
Nov 12, 2026
planetf1
left a comment
Contributor
There was a problem hiding this comment.
Thanks, that's exactly what I was after, and the temp_dir guard is a good catch too. I ran the new tests against huggingface-hub 0.33.4 and 1.16.1, and they all fail with the fix reverted.
As mentioned, I've raised the remaining huggingface-cli login wording in the docs and adapter errors as #1813. While reading upload_intrinsic I also found it modifies the local adapter directory, deleting README.md and leaving io.yaml behind. That bug is older than this PR and is now #1812.
3 of 8 tasks
This was referenced Nov 16, 2026
Merged
via the queue into
generative-computing:main
with commit Nov 16, 2026
807b540
12 checks passed
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.
Pull Request
Thanks for sending a pull request! Please make sure you read the contributing guidelines.
Issue
Fixes #1791
Description
The aLoRA upload commands now use
huggingface_hub.get_token(), available throughout the supported Hub range, instead of the removedHfFolder. Both upload modules import successfully with Hub 1.x, andadd-readmereaches its intended authentication flow rather than reporting a missing extra that is already installed.The intrinsic uploader also guards cleanup until its staging directory has been created. Otherwise a missing token raises the intended
OSErrorbut thefinallyblock replaces it with anUnboundLocalError, hiding the authentication error once the import is fixed.Seven offline regressions exercise module imports and authenticated/missing-token paths for plain uploads, intrinsic uploads, and README upload orchestration. Hub writes are mocked; README generation is isolated from the LLM. No real credentials, model downloads, or uploads are required. Existing staging and upload payload behavior is retained.
Testing
Local checks on Python 3.12, based on
mainatcf484f7:uv run --no-sync pytest test/cli -m 'not e2e and not qualitative' --no-cov -q: 496 passed, 2 skipped. This is the selected CLI suite, not a full all-extras/backend/e2e run.huggingface-hub==0.33.4and the lockedhuggingface-hub==1.16.1. Before the fix, all seven fail against Hub 1.16.1 on the removed import.--follow-imports=skip.--no-install-types --interactive -O json --no-incremental --no-error-summary .against both this branch and an unmodified archive of the currentmain, using the same environment. Both report the same 148 errors across 50 files, with no added or removed errors. This does not claim a passing full pre-commit gate or the complete optional-dependency CI environment.Attribution
Assisted by OpenAI Codex. Changes and verification were reviewed before submission.
Adding a new component, requirement, sampling strategy, or tool?
If your PR adds or modifies one of the types below, check the matching box. A checklist of type-specific review items will be posted as a comment.
This is a CLI compatibility fix; none of these types changes.