Skip to content

feat: Cherry pick efficiency PRs for Lag16 scaling - #1

Open
saumishr wants to merge 6 commits into
parthmannan:pmannan/add_sc_telemetry_lag_studiesfrom
saumishr:lag16-scaling
Open

saumishr wants to merge 6 commits into
parthmannan:pmannan/add_sc_telemetry_lag_studiesfrom
saumishr:lag16-scaling

Conversation

@saumishr

Copy link
Copy Markdown

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

  • You can potentially add a usage example below
# Add a code snippet demonstrating how to use this

Before your PR is "Ready for review"

Pre checks:

  • Make sure you read and followed Contributor guidelines
  • Did you write any new necessary tests?
  • Did you run the unit tests and functional tests locally? Visit our Testing Guide for how to run tests
  • Did you add or update any necessary documentation? Visit our Document Development Guide for how to write, build and test the docs.

Additional Information

  • ...

ananthsub and others added 6 commits September 17, 2026 12:56
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants