Skip to content

refactor: unify per-prompt rollout to RolloutManager - #2567

Merged
yuki-97 merged 7 commits into
mainfrom
yukih/per-prompt-rollout-refactor
Jun 11, 2026
Merged

yuki-97 merged 7 commits into
mainfrom
yukih/per-prompt-rollout-refactor

Conversation

@yuki-97

@yuki-97 yuki-97 commented May 26, 2026 •

Copy link
Copy Markdown
Contributor

Issue

Part of RL-729. Based on #2566.

Summary

Refactors AsyncRolloutManager and AsyncNemoGymRolloutManager into a unified RolloutManager factory.

  • Rename the two concrete classes to AsyncRolloutImpl / AsyncNemoGymRolloutImpl
  • Add RolloutManager that accepts use_nemo_gym: bool and routes to the appropriate impl, with assertions for required path-specific args
  • Add **kwargs to both impl constructors to accept the combined parameter set

Tests

  • Updated all existing AsyncRolloutManager / AsyncNemoGymRolloutManager callsites in tests/unit/experience/test_rollouts.py to use RolloutManager
  • Added test_rollout_manager_raises_without_impl_params to cover the three assertion paths

@copy-pr-bot

copy-pr-bot Bot commented May 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@yuki-97
yuki-97 force-pushed the yukih/per-prompt-rollout-native-async branch from 4f25097 to 1ceeb56 Compare June 3, 2026 06:21
@yuki-97
yuki-97 force-pushed the yukih/per-prompt-rollout-refactor branch from 7db5775 to a7dc06b Compare June 3, 2026 07:34
@yuki-97
yuki-97 marked this pull request as ready for review June 3, 2026 07:37
@yuki-97
yuki-97 requested review from a team as code owners June 3, 2026 07:37
@yuki-97
yuki-97 requested review from mehraakash and terrykong June 3, 2026 07:38
yuki-97 added a commit that referenced this pull request Jun 8, 2026
Signed-off-by: Yuki Huang <[email protected]>

@terrykong terrykong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for splitting this out — the unified RolloutManager factory reads cleanly and test_rollout_manager_raises_without_impl_params nicely covers all three assertion paths.

One substantive item (left as an inline comment): the NeMo-Gym truncation flag now compares against max_seq_len instead of the engine's max_model_len, which diverges from the pre-refactor behavior and from rollouts.py's NeMo-Gym metrics. It's latent (no production callers yet, and current tests/configs set the two values equal) but would mis-report truncation_rate once max_total_sequence_length != vllm_cfg.max_model_len.

Reviewed as the incremental diff on top of #2566.

Generated by Claude Code

Comment thread nemo_rl/experience/rollout_manager.py Resolved
@yuki-97
yuki-97 force-pushed the yukih/per-prompt-rollout-native-async branch from 16eda62 to ba23172 Compare June 9, 2026 12:56
Base automatically changed from yukih/per-prompt-rollout-native-async to main June 9, 2026 16:07
yuki-97 added 5 commits June 9, 2026 23:39
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
Signed-off-by: Yuki Huang <[email protected]>
@yuki-97
yuki-97 force-pushed the yukih/per-prompt-rollout-refactor branch from a7dc06b to 4757fe1 Compare June 10, 2026 06:41
@yuki-97

yuki-97 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test b626095

@yuki-97 yuki-97 added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Jun 10, 2026
Comment thread nemo_rl/experience/rollout_manager.py Resolved
@yuki-97
yuki-97 merged commit 557446d into main Jun 11, 2026
98 of 100 checks passed
@yuki-97
yuki-97 deleted the yukih/per-prompt-rollout-refactor branch June 11, 2026 02:54
pengdurice pushed a commit to pengdurice/RL that referenced this pull request Jun 12, 2026
ashors1 pushed a commit that referenced this pull request Jun 27, 2026

This branch was previously deployed

2 inactive deployments
test — b626095e Deployed Jun 10, 2026 by copy-pr-bot[bot] via Wait in test approval queue #12182
public — b626095e Deployed Jun 10, 2026 by copy-pr-bot[bot] via release / finalize / publish-docs #919
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants