Repository navigation
fix(grpo): apply effort shaping to async Gym rollouts - #3885
Merged
Merged
Conversation
Legacy async GRPO forwarded reward penalties to NeMo Gym rollout postprocessing but omitted the configured effort levels. As a result, training silently skipped length-based effort shaping even though synchronous rollouts and validation applied it. Resolve the existing validated effort config in the async trajectory collector and pass it to every NeMo Gym stream attempt. Add regression coverage at the collector-to-rollout boundary, including the retry path. Signed-off-by: Yi-Fu Wu <[email protected]>
yuki-97
approved these changes
Aug 28, 2026
Contributor
|
/ok to test fbc6a88 |
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.
Problem
Legacy async GRPO calls
run_async_nemo_gym_rolloutwithouteffort_config. Runs configured withenv.nemo_gym.effort_levelstherefore shape synchronous and validation rewards but silently skip the same shaping during async training.Change
AsyncTrajectoryCollectorThis addresses the gap identified in #3770 (comment).
Validation
pytest -q tests/unit/algorithms/test_async_utils.py -k nemo_gym_batch_retry_forwards_effort_config_without_duplicatespytest -q tests/unit/test_effort_shaping.py tests/unit/single_controller/test_setup.py -k effortruff check nemo_rl/algorithms/async_utils/trajectory_collector.py tests/unit/algorithms/test_async_utils.pyruff format --check nemo_rl/algorithms/async_utils/trajectory_collector.py tests/unit/algorithms/test_async_utils.py