Repository navigation
fix: support reward-model environments on SingleController - #5530
Open
macandro96 wants to merge 1 commit into
Open
macandro96 wants to merge 1 commit into
macandro96 wants to merge 1 commit into
Conversation
macandro96
marked this pull request as ready for review
December 3, 2026 02:33
4 of 21 tasks
Two bugs kept a reward-model environment from working on the SC native rollout path: - SC never set aside the reward model's GPUs. RewardModelEnvironment claims env.reward_model.resources for itself when setup builds it, which happens before SC sizes its clusters, so on a fully used node the two waited on each other's placement groups. _build_clusters now leaves those GPUs out, split the same way as legacy GRPO setup. - Scoring a single response returned a 0-d tensor. SC steps the environment one sample at a time, and score() squeezed the already-squeezed scores again, so BatchedDataDict.from_batches failed with "iteration over a 0-d tensor". Add grpo_rm_1B_megatron_single_controller.yaml and an SC sibling of grpo_rm_env.sh (3 GPUs: trainer, generation, reward model), registered as a fast entry in L1_Functional_Tests_SingleController_4.sh. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
macandro96
force-pushed
the
amahishi/sc-rm-env
branch
from
December 4, 2026 04:18
d9cded1 to
cd85269
Compare
Contributor
Author
|
/ok to test cd85269 |
This branch has not been deployed
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.
What and why
GRPO can score responses with a reward model (
env.reward_model) instead of a rule-based checker. This worked on the legacy path but failed on SingleController (SC) for two reasons:This PR fixes both and adds an SC reward-model example config and a functional test, the SC counterpart of
grpo_rm_env.sh.Issues
Part of #5044
Convergence / perf / functionality proof
Bug fixes plus tests. The new SC functional test passes locally on 3×H100, and its rewards come from the reward model, not the default math checker. The new unit tests fail without the fixes and pass with them.
Needs upstream changes
None
PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./nightly-ci test-case=<test>: run NVIDIA's nightly CI for the PR head; eligible teams only./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.🤖 Generated with Claude Code