Repository navigation
Create the branch before pushing a LoRA GGUF to a revision - #13915
Conversation
|
@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. Keep it up! 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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. You're on a roll. 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". |
NilayYadav
left a comment
There was a problem hiding this comment.
Review + reproduction evidence
Pinned review: 308618a80f. 3 minor findings on the submitted head ec8c9a91f6, fixed in 308618a80f.
I reproduced a LoRA GGUF push to a new branch on fresh upstream main (Linux, NVIDIA L4, huggingface_hub 1.30.0, transformers 5.16.1): load unsloth/SmolLM2-135M-Instruct, add a r=8 LoRA, train 3 steps, then model.push_to_hub_gguf(repo, tokenizer, save_method="lora", revision="v2") on a fresh private repo.
- main
5e55110: the conversion runs, then the upload fails withRevisionNotFoundError: 404 ... Invalid rev id: v2. The repo only hasmainwith.gitattributes, and the converted file is gone.push_to_hub_ggml(revision="v3")fails the same way. - PR head
308618a:Unsloth: Done. Uploaded to https://huggingface.co/<user>/<repo>/tree/v2, branches['main', 'v2'], and the.ggufis onv2.push_to_hub_ggml(revision="v3")lands onv3. A second push tov2succeeds.
Fixed in 308618a:
create_pr=Truewithrevision="v4": huggingface_hub 1.20 and later refuse this inupload_folder(Cannot use create_pr=True with revision='v4'). The submitted head createdv4first, so the call failed and still left a strayv4branch on the repo. The branch is now only created when no pull request is requested, so the outcome matchesmain.- The done message always printed the repo root. It now points at
/tree/<revision>,/discussions/<n>or the new pull request. - The new test was not listed in
consolidated-tests-ci.yml, so no CI job ran it. It is now in both CPU lists.
Unchanged on all three builds: a push with no revision, revision="main", create_pr=True, and a push into refs/pr/1. Studio's export never passes revision or save_method="lora" to this function, so Studio is not affected. The only cost is one extra Hub call, and only when a new branch is requested.
Tests on GPU, main vs this head: tests/saving/test_push_to_hub_lora_gguf_revision.py gives 4 failed, 5 passed on main and 9 passed on the PR.
Conclusion: the bug is real and fixed. The adjacent upload paths are unchanged. Merge once upstream CI is green.
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, 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". |
…p guards (#13936) Two more checks are red on main (7382805), seen on #13915 and #13922's run, both reproduced locally on main. ## `test_no_raw_pixel_text_utilities` (from #13850) ``` Raw px text utilities ignore the UI font size preference; use the text-ui-* / leading-ui-* tokens in index.css instead: features/studio/sections/token-preview-dialog.tsx: text-[12.5px] features/studio/sections/token-preview-dialog.tsx: text-[9px] ``` The new token preview dialog sized three text runs with raw `text-[12.5px]` / `text-[9px]`, so they stay fixed when the user changes Settings > UI font size while the rest of Studio scales. The contract is right and the dialog is what changes. `index.css` has exact tokens for both sizes, `--text-ui-12p5: calc(0.78125rem * var(--ui-font-scale, 1))` and `--text-ui-9: calc(0.5625rem * var(--ui-font-scale, 1))`, so this swaps to `text-ui-12p5` / `text-ui-9`. At the default scale of 1 those resolve to the same 12.5px and 9px, so the dialog renders the same as today; the only difference is that it now follows the font size setting. No screenshots: there is nothing visible to compare at the default scale. ## `test_no_skip_guard_reads_a_spoofable_accelerator_probe` (from #13830 and #13889) ``` test_fp8_rowwise_gemv_blackwell_gate.py:47: torch.cuda.is_available() test_norm_fast_launch.py:189: torch.cuda.device_count() ``` `tests/_zoo_aggressive_cuda_spoof.py` patches the torch.cuda probes to report a GPU process-wide for the version-compat suites, so a skip guard that reads them un-skips on a CPU-only runner whenever it shares a pytest session with those suites. Both guards now ask `has_real_cuda()` from `tests/_shared/real_accelerator.py` (answered before any spoof), the form the rest of the tree uses: `not has_real_cuda()` for the FP8 GEMV exactness test, and `not has_real_cuda() or torch.cuda.device_count() < 2` for the two-GPU norm test, matching `test_rms_layernorm_multirow.py`. On a real GPU the predicate is the same as before. ## Verification - `tests/studio/test_ui_font_scale_contract.py`: fails on main as above, 12 passed here. Prettier clean. - `tests/python/test_accelerator_skip_guards.py`: fails on main as above, 24 passed here. - On CPU, `test_fp8_rowwise_gemv_blackwell_gate.py` and `test_norm_fast_launch.py`: 6 passed, 4 skipped (the GPU cases, with their reasons), same as main. - Not run here: the GPU cases themselves. This host's CUDA torch environment fails bitsandbytes CUDA setup at collection, unrelated to this change; the test bodies are untouched.

Pushing a LoRA adapter as GGUF to a branch that does not exist yet, with
push_to_hub_gguf(..., save_method="lora", revision="v2")orpush_to_hub_ggml(..., revision="v2"), failed with a Hub error after the conversion had already finished. The converted file was then deleted with the temp folder, so the only way out was to create the branch by hand and convert again. The merged and quantized GGUF pushes already create the branch first and work with the same arguments.The LoRA GGUF upload now creates the requested branch before uploading, the same way the other GGUF and merged uploads do. Pull request revisions (
refs/pr/N) are left alone, and a pull request to a branch without write access still goes through. Pushes without a revision, or to a branch that already exists, behave as before.