fix(grpo): support environment sample masking in single controller - #3766
Conversation
|
Heads-up: I had #3786 open doing an overlapping thing, and yours came first and covers more — I've said so there and will cut mine down to the non-overlapping remainder rather than compete with it. Two things from reading yours that might be useful: The One gap that survives this PR. The prompt-level |
|
Correction to what I wrote above — I said #3766's coverage is a superset of this PR's. It isn't, and the difference matters in your favour, @macandro96. I checked #3766's
So the accurate split is:
Which doesn't change my conclusion — #3766 came first, its column-based shape is the better one, and I'd rather not have two mechanisms for one rule. But the right outcome isn't "close this"; it's that #3766 needs the Happy to send those two as a small PR on top of #3766 once it lands, and close this. Or, if it's easier, take the two lines from here directly — no attribution needed. :) |
yfw
left a comment
There was a problem hiding this comment.
Team review of the mask-composition change: 6 agents (RL expert, bug finder, test agent, design reviewer, comment reviewer, devil's advocate), all findings adversarially challenged before posting. Thanks for this — the env mask_sample gap on the SingleController path is a real parity hole and the column-based shape is the right way to close it.
Please rebase first. This branch is currently CONFLICTING and 35 commits behind main. Three of the six comments below are only about what happens after that rebase, and two of them describe changes that no merge conflict and no CI run will point at — I simulated the merge to check.
The description is the unfilled template; a sentence on which recipe you ran, and on whether the advantage-mask split is intentional, would resolve most of what's below.
Deliberately not asking for convergence curves: the one open question (the advantage-mask split) is semantic rather than empirical — a curve wouldn't tell us whether normalizing over dropped rows is intended. Worth answering yes/no first.
Verified clean and worth noting so nobody re-raises them: pre-commit run --all-files passes every hook; the mask_sample key path matches Gym and the legacy reader exactly; env.should_mask_flagged_samples=false is already honoured upstream at rollout_manager.py:1021 so no second config knob was needed; adding both fields to PROMOTE_1D_FIELDS was mandatory, not optional (the Mooncake adapter rejects undeclared dense-1D tensors) and the round-trip test pins it; num_mask_sample_filtered matches the legacy metric name and emission semantics; and AdvantageConfig is correctly a @dataclass of internal column names, so no exemplar-YAML update is owed.
Generated by Claude Code
bf66394 to
48121bb
Compare
|
/ok to test 48121bb |
48121bb to
5c540c3
Compare
|
/ok to test 5c540c3 |
Signed-off-by: Anish Mahishi <amahishi@nvidia.com>
5c540c3 to
7482514
Compare
|
/ok to test 7482514 |
What does this PR do ?
Support #3163 for single controller path
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information