Repository navigation
Load #11526's text-core refusal in the save_method routing harness - #12077
Merged
Merged
Conversation
The routing tests exec unsloth_generic_save against fakes with a listed set of save.py helpers. #11526 added a call to _refuse_unsaveable_text_core and updated test_merged_hub_destination's harness but not this one, so every routing test raised NameError in the Core jobs. Load it (and _honours_safe_serialization) as real code, stub the Qwen3.5 VLM state dict helper the harness never reaches, and add a guard that names any save.py helper the generic save calls that the harness neither loads nor stubs.
Member
Author
|
@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. Hooray! 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". |
danielhanchen
deleted the
lora-routing-harness-loads-text-core-guard
branch
September 27, 2026 04:05
shaojun
pushed a commit
to shaojun/unsloth
that referenced
this pull request
Sep 29, 2026
…arness (unslothai#12077) The routing tests exec unsloth_generic_save against fakes with a listed set of save.py helpers. unslothai#11526 added a call to _refuse_unsaveable_text_core and updated test_merged_hub_destination's harness but not this one, so every routing test raised NameError in the Core jobs. Load it (and _honours_safe_serialization) as real code, stub the Qwen3.5 VLM state dict helper the harness never reaches, and add a guard that names any save.py helper the generic save calls that the harness neither loads nor stubs.
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.
The Core jobs (
HF=latest + TRL=latest,HF=default + TRL=default) fail on main-based PRs, for example #12065:This reproduces on main at
c807acbf4: the three[lora]cases, the fourtest_every_other_method_still_mergescases,test_a_model_with_no_adapter_is_unchangedandtest_none_is_normalised_before_the_merge_is_reached.Cause
These tests do not import
unsloth.save. They execunsloth_generic_save, plus a listed set of helpers, against fakes. #11526 (b53a6d7a4) added a_refuse_unsaveable_text_core(model, save_method)call at the top ofunsloth_generic_save. It updated the equivalent harness intests/test_merged_hub_destination.pybut not this one, so every routed save raisesNameError.The product is fine. The helper exists and is correct, and only the harness's list of helpers is out of date.
Fix
_normalize_safe_serialization,_is_adapter_save_method,_honours_safe_serialization,_refuse_unsaveable_text_core._qwen3_5_vlm_state_dict_for_savegets a stub that raises if reached;_is_qwen3_5_vlmis already stubbed toFalse.test_every_helper_the_generic_save_calls_is_loaded_or_stubbed: it walksunsloth_generic_savewithastand requires everysave.pyfunction it calls to be in one of the two lists, and every listed name to still be called. The next helper added there fails with its name instead of aNameErroracross the whole file.Verification
_refuse_unsaveable_text_corefrom the tuple brings back the CINameErrorin the routing tests, and the guard fails with:unsloth_generic_save calls ['_refuse_unsaveable_text_core'] from save.py, which the routing harness neither loads nor stubs.