Skip to content

feat(sc): abort stale in-flight rollouts early in non Gym path - #3263

Merged
yuki-97 merged 8 commits into
mainfrom
ruit/sc-entrypoint-gate
Aug 12, 2026
Merged

yuki-97 merged 8 commits into
mainfrom
ruit/sc-entrypoint-gate

Conversation

@RayenTian

@RayenTian RayenTian commented Jul 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Support aborting stale in-flight prompt groups when they fall outside the sampler selection window.
  • Add W&B metrics for evicted stale prompt groups (train/evicted_stale_prompt_groups) and aborted stale in-flight groups (train/aborted_stale_inflight_groups).
  • Fix the legacy GRPO tokenizer decode error by explicitly disabling tokenization-space cleanup.

Tests

Recipe: examples/configs/recipes/llm/performance/grpo-llama3.1-8b-instruct-2n8g-async-1off.yaml

disable kv cache recompute

image

enable kv cache recompute

image

@copy-pr-bot

copy-pr-bot Bot commented Jul 17, 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.

@RayenTian
RayenTian changed the base branch from yukih/sc-entrypoint to main July 31, 2026 04:29
@RayenTian
RayenTian force-pushed the ruit/sc-entrypoint-gate branch 3 times, most recently from 5aaedbb to cc02515 Compare August 1, 2026 06:17
@RayenTian RayenTian added the CI:Lfast Runs a fast test suite and re-use nightly `main` container (but sync dependencies to PRs version) label Aug 1, 2026
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test cc02515

Comment thread nemo_rl/experience/rollouts.py Resolved
@RayenTian
RayenTian marked this pull request as ready for review August 1, 2026 07:05
@RayenTian
RayenTian requested review from a team as code owners August 1, 2026 07:05
@RayenTian
RayenTian requested review from mehraakash and yuki-97 August 1, 2026 07:05
@RayenTian
RayenTian force-pushed the ruit/sc-entrypoint-gate branch from cc02515 to 728de3f Compare August 1, 2026 13:58
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 728de3f

@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 2019c54

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for supporting this, changes overall LGTM. left some comments and one q for nemo-gym path.

Comment thread tests/unit/experience/test_rollouts.py Resolved
Comment thread nemo_rl/experience/rollouts.py Resolved
Comment thread nemo_rl/algorithms/single_controller.py Resolved
@RayenTian
RayenTian force-pushed the ruit/sc-entrypoint-gate branch 2 times, most recently from 0416763 to 43baf36 Compare August 4, 2026 06:17
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 0510d09

@RayenTian RayenTian changed the title feat(sc): abort stale in-flight rollouts early under over_sampling feat(sc): abort stale in-flight rollouts early under over_sampling in non Gym path Aug 6, 2026
@RayenTian RayenTian changed the title feat(sc): abort stale in-flight rollouts early under over_sampling in non Gym path feat(sc): abort stale in-flight rollouts early in non Gym path Aug 6, 2026
@parthmannan

Copy link
Copy Markdown
Contributor

Had a quick question on the graphs (haven't read the changes yet) - Why do we not see any evicted stale groups when not aborting? staleness_window would still evict samples even when we don't abort in-flight samples?

@RayenTian

RayenTian commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Had a quick question on the graphs (haven't read the changes yet) - Why do we not see any evicted stale groups when not aborting? staleness_window would still evict samples even when we don't abort in-flight samples?

Yes, we also evict groups when we don't abort in-flight samples. Because the two panels are added in this PR, and no-abort version runs are running on main, so there're no panels for the runs. In theory, in scenarios without abort, the evict count should be the sum of the values from the two current panels.

Comment thread nemo_rl/algorithms/single_controller.py Resolved
@RayenTian
RayenTian force-pushed the ruit/sc-entrypoint-gate branch from 0510d09 to bec1089 Compare August 11, 2026 10:51
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test bec1089

Signed-off-by: ruit <[email protected]>
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test d1a1bbe

@RayenTian
RayenTian requested a review from yuki-97 August 11, 2026 11:59
_sync_weights now gates stale-abort on _should_use_nemo_gym(master_config),
which reads master_config.env. The _train_pump test builds its MasterConfig
via model_construct without env, so the real-actor training step hit
AttributeError: 'MasterConfig' object has no attribute 'env'. Add env={} so
the gate resolves to the native (non-gym) path.

Signed-off-by: ruit <[email protected]>
@RayenTian

Copy link
Copy Markdown
Contributor Author

/ok to test 132f9d9

@yuki-97
yuki-97 merged commit af451b1 into main Aug 12, 2026
91 of 92 checks passed
@yuki-97
yuki-97 deleted the ruit/sc-entrypoint-gate branch August 12, 2026 03:24
asolergi-nv added a commit to asolergi-nv/RL that referenced this pull request Aug 13, 2026
upstream NVIDIA-NeMo#3263 added a _should_use_nemo_gym check and a stale-in-flight abort to
_sync_weights, so the minimal controller this fixture builds no longer reaches
the refit -- it dies on AttributeError: no attribute '_master_config'.

An empty env dict selects the native path and an empty registry makes
_abort_stale_inflight a no-op. Neither is what these tests are about; both just
have to exist for the refit to be reached at all.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Signed-off-by: asolergibert <[email protected]>
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.

3 participants