Repository navigation
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Author
|
/ok to test 1ad93f4 |
ananthsub
previously approved these changes
May 7, 2026
ananthsub
reviewed
May 7, 2026
yuki-97
previously approved these changes
May 7, 2026
Contributor
|
/ok to test 97da8ed |
jthomson04
force-pushed
the
jthomson04/fix-async-rollout-max-seq-len
branch
from
May 7, 2026 22:28
73a1465 to
fcd79aa
Compare
Contributor
Author
|
/ok to test fcd79aa |
jthomson04
force-pushed
the
jthomson04/fix-async-rollout-max-seq-len
branch
from
May 7, 2026 23:04
4566b2e to
646769b
Compare
Contributor
Author
|
/ok to test 646769b |
yuki-97
previously approved these changes
May 8, 2026
yuki-97
enabled auto-merge (squash)
May 8, 2026 03:53
Contributor
Author
|
/ok to test 646769b |
`run_async_nemo_gym_rollout` previously asserted `max_seq_len is None` and discarded `generation_config["max_new_tokens"]`, leaving every row's `responses_create_params` with whatever `max_output_tokens` the agent template happened to set (often unset, leading to runaway generations that exceeded the configured cap). Drop the assertion, document why we accept `max_seq_len` for API parity without translating it (semantics differ from row-level `max_tokens`), and write `generation_config["max_new_tokens"]` into each row's `responses_create_params["max_output_tokens"]`, taking the min with any existing per-row value. Update the four call sites in grpo / async / nemo-gym example to pass `master_config["policy"]["max_total_sequence_length"]` instead of `None` so the rollout parameter actually reflects the configured cap. Update `test_run_async_nemo_gym_rollout` to verify `max_output_tokens` gets populated from `generation_config["max_new_tokens"]`. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Pre-set one row's max_output_tokens to a looser value than max_new_tokens to exercise the min() clamp-down branch alongside the existing no-override branch. Uses max_new_tokens + 1 so the effective generation cap is unchanged and the rollout's golden token-count assertions still hold. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: jthomson04 <[email protected]>
- Move the max_seq_len API-parity comment to the top of run_async_nemo_gym_rollout so it is visible on entry (per yuki-97). - Warn when the policy max_total_sequence_length is greater than the generation engine's max_model_len so users notice the mismatch instead of silently relying on engine-side truncation (per ananthsub). - Update test_run_async_nemo_gym_rollout to pass the engine's max_model_len for max_seq_len so the assertion still holds without firing the new warning. Signed-off-by: jthomson04 <[email protected]>
Collapse the multi-line `assert row[...] == max_new_tokens` so ruff-format leaves the file unchanged on CI. Signed-off-by: jthomson04 <[email protected]>
jthomson04
force-pushed
the
jthomson04/fix-async-rollout-max-seq-len
branch
from
May 9, 2026 18:09
646769b to
aaa1f0e
Compare
Contributor
Author
|
/ok to test aaa1f0e |
Contributor
|
hi @jthomson04 , there's a fail test |
The nemo-gym recipe YAMLs previously set max_new_tokens = max_model_len = max_total_sequence_length. That was fine while run_async_nemo_gym_rollout dropped max_new_tokens on the floor, but now that this PR plumbs it into responses_create_params.max_output_tokens, every vLLM request asks for the entire context as output and there is no room left for the prompt — vLLM rejects with VLLMValidationError, the async buffer never fills, and the run hangs. Set max_new_tokens to a literal 8192 in the two nemo-gym recipes and add a per-run max_new_tokens=128 override to grpo_async_gym.sh so the smoke test (max_total_sequence_length=512) still leaves room for prompts. Signed-off-by: jthomson04 <[email protected]>
…el_len The warning branch in run_async_nemo_gym_rollout had no coverage in the PR (codecov/patch flagged it). Add a focused unit test that fakes policy_generation.cfg, passes max_seq_len > max_model_len to trigger the warning, and lets the next stop_strings assert fire so the test stays GPU-free. Signed-off-by: jthomson04 <[email protected]>
Contributor
Author
|
/ok to test e00c954 |
terrykong
approved these changes
May 11, 2026
zswerth
pushed a commit
to zswerth/RL
that referenced
this pull request
May 12, 2026
…VIDIA-NeMo#2365) Signed-off-by: jthomson04 <[email protected]> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]> Signed-off-by: zswerth <[email protected]>
2 tasks done
This branch was previously 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.
Summary
run_async_nemo_gym_rolloutpreviously assertedmax_seq_len is Noneand discardedgeneration_config["max_new_tokens"], leaving every row'sresponses_create_paramswith whatevermax_output_tokensthe agent template happened to set (often unset). With no per-request cap, generations could exceed the configured budget and either run away or get killed by vLLM after wasting compute.assert max_seq_len is Noneand document why we acceptmax_seq_lenfor API parity without translating it into row-levelmax_tokens(the semantics differ — total sequence length vs. max new tokens).generation_config["max_new_tokens"]into each row'sresponses_create_params["max_output_tokens"], takingminwith any existing per-row value so per-agent overrides still win when stricter.run_grpo_nemo_gym.pyexample) to passmaster_config["policy"]["max_total_sequence_length"]instead ofNoneso the rollout parameter actually reflects the configured cap.test_run_async_nemo_gym_rolloutto verifymax_output_tokensgets populated fromgeneration_config["max_new_tokens"].Test plan
tests/unit/experience/test_rollouts.py::test_run_async_nemo_gym_rolloutpasses (assertsmax_output_tokensis set on every row after the rollout).policy.generation.max_new_tokens(no runaway sequences) and that the call sites no longer trip the removed assertion.🤖 Generated with Claude Code