Conversation
Add env.nemo_gym.shards, common_overrides, and allowed_duplicate_entries, with validation and per-shard config composition. Actor creation remains in a later layer; sharded configs fail during setup until that factory is present. Reject top-level config paths and Gym entry overlays when shards are declared because their owning shard is ambiguous. Remove NeMo-RL-only sharding keys before forwarding the merged config to Gym. Add per-instance log-directory suffixing alongside the schema so actors that host the same server names do not append to the same files. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Keep inherited Gym entry values in their parent recipe while assigning each entry to a shard explicitly. Single-shard plans claim all remaining entries automatically because their scope is unambiguous. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Keep dict-shaped rollout and tokenizer settings out of the Gym server-entry inventory because NeMo RL consumes them separately. Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
(cherry picked from commit 74b857c) Adapted for this base, which predates the actor-runtime-env refactor: - Keeps create_local_venv_on_each_node; NEMO_GYM_ACTOR_FQN and make_actor_runtime_env are context from the upstream parent, not this commit, and this tree's spinup does not use them. - Omits the test_nemo_gym_utils.py additions: they patch make_actor_runtime_env and use a detected_uv_dirs fixture that this base does not have. The production change (graceful-shutdown timeout and spinup cleanup) and test_nemo_gym_rollout.py are kept in full.
…Mo#3368) (cherry picked from commit 87a0aa6) Adapted for this base: - examples/run_grpo.py keeps _select_trainer (upstream renamed it to select_sync_trainer in a commit not on this base); the teardown-ownership flag and conditional shutdown are applied as upstream wrote them. - Omits the test_nemo_gym_utils.py additions: they rely on a detected_uv_dirs fixture and patch make_actor_runtime_env, neither of which exists here, because this base predates the actor-runtime-env refactor. Teardown behaviour stays covered by tests/unit/environments/test_environment_utils.py.
Brings nemo_gym_shards.py to the state validated by the lag-16 scaling run: placement strategies with a STRICT_SPREAD default, GYM_ROUTABLE_KEYS, the ShardSetupError type, and build_route_shard_map, which maps a route to the shard that serves it. Taken as final state rather than replayed commit-by-commit. The module imports only stdlib and omegaconf, so it carries none of the API drift that makes the intermediate commits conflict against this base. 65 unit tests in tests/unit/environments/test_nemo_gym_shards.py pass here.
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 does this PR do ?
Add a one line overview of what this PR aims to accomplish.
Issues
List issues that this PR closes (syntax):
Usage
# Add a code snippet demonstrating how to use thisBefore your PR is "Ready for review"
Pre checks:
Additional Information