Repository navigation
GRPO kept-set refusals: stop saying UNSLOTH_GRPO_TRUNCATED_SUPPORT=1 was set - #15307
Conversation
…was set unsloth-zoo now turns kept-set scoring on automatically for truncated vLLM rollouts that feed the IS correction or off-policy mask, so the refusals for a reference model, reused rollouts or a skipped weight sync can fire with the variable unset. They now say the trainer is not scoring over the kept set and why, without claiming the user set =1. Adds a test that fails on main.
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. What shall we delve into next? 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". |
…ugh its aliases (#15319) ## Problem `Repo tests (CPU, studio)` is red on main since #15233, so every PR based on it fails the same check (for example #15306 and #15307): ``` tests/studio/test_model_picker_contracts.py::test_a_multi_quant_parent_row_still_has_no_gear E AssertionError: the multi-quant parent row lost the spacer that stands in for a gear ``` #15233 replaced the empty gutter spacer on an On Device multi-quant parent row with a chevron in the same column, wrapped in `ROW_ACTIONS_PINNED_CLASS`, which is `cn(ROW_ACTIONS_CLASS, "opacity-100")`. The guard only accepted the literal name `ROW_ACTIONS_CLASS`, so it read the renamed reference as a missing gutter. Bisected locally: the test passes at 61cfbaa and fails from 2563513 (#15233) onwards. ## Product or test The product is fine. What the guard protects is that the parent row has no gear, because `playwright_model_config.py` finds gears by their accessible name (`Inference settings for ...`) and reads "no gear" as "this row expands". The new chevron is an `aria-hidden` button with no label, so the driver still sees no gear. The test was too literal. ## Fix - The gutter is matched through `ROW_ACTIONS_CLASS` and every constant whose definition is built from it, read from `pickers.tsx` itself, so a future alias does not reopen this. A new test checks that reader (it finds at least one alias on main, and ignores a `ROW_ACTIONS_*` constant that does not build on the gutter class). - The check now reads the expandable branch of the parent row. Before, the partial-repo branch's row-menu gutter also satisfied it, so removing the gutter from the branch that expands still passed. - New: that branch must not contain an `aria-label`, since a labelled control there is what would break the driver's inference. ## Verification - `tests/studio/test_model_picker_contracts.py`: 202 passed on main's source (1 failed before this change). - Sabotage, each run against main's `pickers.tsx` with one edit: - gutter class removed from the expandable branch: fails (passed with the old guard) - `<ModelLoadSettingsAction />` added to that gutter: fails - the chevron button given `aria-label="Inference settings for x"`: fails - The guard also passes against the pre-#15233 `pickers.tsx` (61cfbaa).
Since unslothai/unsloth-zoo#2084, kept-set scoring (
UNSLOTH_GRPO_TRUNCATED_SUPPORT) turns on automatically when truncated vLLM rollouts (top_k/top_p/min_p) feed TRL's IS correction or off-policy mask. Unsloth refuses kept-set scoring when the scored policy is not the sampler:beta != 0);Those refusals still said
Unsloth: ignoring UNSLOTH_GRPO_TRUNCATED_SUPPORT=1 because .... That now fires for users who never set the variable, and tells them they set something they did not.Change (
unsloth/models/rl_replacements.py)Unsloth: not scoring over the rollouts' top_k / top_p / min_p kept set. They name the variable as=1, or automatic for truncated vLLM rollouts feeding the IS correction or off-policy mask, then give the reason as before.Tests
test_refusals_do_not_claim_the_variable_was_setintests/test_grpo_truncated_support_policy_gate.py. With the variable unset, it runs both refusal paths (reference model, skipped sync) and checks that neither message claims=1was set. It fails on main and passes here.tests/test_*grpo*.pyCPU tests:test_grpo_sample_weight.py::test_group_with_one_scored_completion_is_kept, is the same on both and is unrelated to this change.