Repository navigation
fix(gym): size every Gym actor's max_concurrency from the rollout fan-in - #5117
Draft
jthomson04 wants to merge 15 commits into
Draft
jthomson04 wants to merge 15 commits into
jthomson04 wants to merge 15 commits into
Conversation
build_nemo_gym_actors created its actors with no max_concurrency, so Ray's async-actor default of 1000 applied to each. Every in-flight prompt holds one run_rollouts call on a Gym actor, and calls past 1000 do not raise or time out: they wait inside the actor, the submitter logs "tasks pending submission to actor NemoGym", and the run stops producing steps. On the SingleController path, size every actor (each shard replica included) for async_rl.max_inflight_prompts plus 8 slots for its control calls. The whole fan-in goes to each replica because routing is by agent name and does not split evenly: in the Nano 3.5 lag-16 shard plan at a 32K batch, each of the 32 verifier replicas carries about 1,073 groups. Callers that declare no fan-in (v1 GRPO, distillation) keep Ray's default. Adapted from saumishr/RL@3570a766fd, which extends NVIDIA-NeMo#3672 to the sharded builder. The env.nemo_gym.max_concurrency override from those commits is left out. Co-authored-by: Saurav Muralidharan <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
…tor-concurrency Brings in NVIDIA-NeMo#5115 restacked on NVIDIA-NeMo#4979 at 45add8b (NeMo RL's chat engine in Dynamo's frontend, Gym at 9aac609). No conflicts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
NaN fix) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…alidArgument -> 500) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… cuts through every frontend) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…t-call steps and cut deadline) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…rs start at registration) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…rs built while the engines load) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… bump and the rebased Gym pin) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… to Gym#4817's review fixes) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… startup check also covers sampling_overrides) into jthomson04/gym-actor-concurrency Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…the prefix-recovery Dynamo run) into jthomson04/gym-actor-concurrency No conflicts. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…d multimodal prefix recovery) into jthomson04/gym-actor-concurrency No conflicts. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
… engine and dynamic sampling under token capture) into jthomson04/gym-actor-concurrency No conflicts. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
…namic sampling for the streaming samplers and checkpointing configs as BaseModel) into jthomson04/gym-actor-concurrency No conflicts. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
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
Every NeMo-Gym actor is created with no
max_concurrency, so Ray's async-actor default of 1000 applies to each one. On the SingleController, every in-flight prompt holds onerun_rolloutscall on a Gym actor. Past 1000 calls, the extra calls do not raise and do not time out. They wait inside the actor, the submitter logstasks pending submission to actor NemoGym, and the run stops producing steps.This PR sizes every actor, each shard replica included, for
async_rl.max_inflight_promptsplus 8 slots for control calls (_spinup,health_check, shutdown).Stacked on #5115. It is needed for the ~0.5M-rollouts-in-flight stress config (32K batch, lag 16).
Credit
This is adapted from Saurabh's
saumishr/RL@3570a766fd, which extends #3672 (still open, written against the pre-build_nemo_gym_actorscode) to the sharded builder. Theenv.nemo_gym.max_concurrencyoverride from those commits is left out: nothing here needs it, and it would add a config key.Testing
tests/unit/environments/test_nemo_gym_utils.pyandtests/unit/single_controller/test_setup.pypass (432 tests).🤖 Generated with Claude Code