Repository navigation
feat: register environment server type - #3482
Merged
Merged
Conversation
|
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. |
ananthsub
force-pushed
the
ananthsub/episode-orchestration-01-server-type
branch
2 times, most recently
from
September 18, 2026 00:55
650d8eb to
d662430
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-01-server-type
branch
from
September 18, 2026 01:06
d662430 to
7b74c39
Compare
ananthsub
marked this pull request as ready for review
September 18, 2026 19:45
ananthsub
requested review from
adil-a,
bxyu-nvidia,
cmunley1,
ffrujeri,
marta-sd and
yaoyu-33
September 18, 2026 19:45
ananthsub
force-pushed
the
ananthsub/episode-orchestration-01-server-type
branch
from
September 18, 2026 20:44
7b74c39 to
7c30274
Compare
ananthsub
marked this pull request as draft
September 18, 2026 22:09
ananthsub
force-pushed
the
ananthsub/episode-orchestration-01-server-type
branch
from
September 18, 2026 22:42
e4d9429 to
7032f04
Compare
yaoyu-33
approved these changes
Sep 19, 2026
yaoyu-33
left a comment
Contributor
There was a problem hiding this comment.
LGTM for this server-type registration layer. Config/discovery tests and focused contract checks passed locally (184 tests).
bxyu-nvidia
approved these changes
Sep 19, 2026
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
ananthsub
force-pushed
the
ananthsub/episode-orchestration-01-server-type
branch
from
September 19, 2026 01:02
7032f04 to
27cd6b1
Compare
ffrujeri
approved these changes
Sep 19, 2026
bxyu-nvidia
deleted the
ananthsub/episode-orchestration-01-server-type
branch
September 19, 2026 04:07
ananthsub
added a commit
that referenced
this pull request
Sep 22, 2026
## What does this PR do?
Adds only the shared episode identity and envelope in
`nemo_gym/episode_types.py`: `EpisodeId`, minimal `TaskId`,
`MaterializedTask`, base request/response, and handled failure.
`TaskId` contains only `taskset` and `task_id`. Taskset names use the
`<environment>:<taskset>` convention when a run blends tasksets.
## Single-agent interaction flow
This diagram shows the built-in single-agent use case. Other Environment
Server protocols may coordinate different participants and use different
request, result, and lifecycle flows.
```mermaid
sequenceDiagram
participant C as Rollout collector
participant E as Environment Server
participant R as Task / Resources Server
participant A as Agent Server
participant M as Model Server
participant S as Task sandbox
C->>E: POST /run
E->>R: Seed task session
R-->>E: Tool access and optional SandboxAccess
E->>A: Seed agent session
A->>S: Connect as borrower when supplied
E->>A: Invoke /v1/responses
A->>M: Model and capture requests
A-->>E: Agent response
E->>A: Close agent session
E->>R: Verify response
E->>R: Close task session
E-->>C: Episode result
```
The Environment Server coordinates ordering and the final result. Agent
and Task/Resources Servers retain ownership of the state and resources
they create.
This is part 2 of 14 in the Environment Server stack. Previous:
[#3482](#3482). Next:
[#3484](#3484).
## Validation
- `uv run pytest tests/unit_tests/test_episode_types.py -q`
## Rollouts
See the final PR for end-to-end rollout evidence.
## Compatibility and benchmark impact
No agent, resources, tool, or sandbox lifecycle contract is included.
Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
alexandery-nvidia
added a commit
to NVIDIA-NeMo/RL
that referenced
this pull request
Oct 12, 2026
NeMo Gym registers environment_servers as a fourth server group next to responses_api_agents, responses_api_models, and resources_servers (NVIDIA-NeMo/Gym#3482; nemo_gym/discovery.py:71 at the Gym commit this repository pins). The mirrored constant GYM_SERVER_TYPE_KEYS in nemo_rl/environments/nemo_gym.py still listed only the original three. NemoGym.list_entries() walks that constant to decide which top-level entries of Gym's resolved config start a server, and drops an entry that holds a server under none of the listed keys. A config entry whose only server group is environment_servers was therefore left out of the report even though Gym starts a process for it, and an entry that pairs environment_servers with another group was reported without that type. _discover_route_shard_map() feeds the report to build_route_shard_map() in nemo_rl/environments/nemo_gym_shards.py, whose per-entry duplicate check rejects a config entry hosted by two shards unless it is allowlisted. A dropped entry never reaches that check, so an environment server that two shards both start was launched twice without the ShardSetupError every other server type gets. This change adds environment_servers to GYM_SERVER_TYPE_KEYS, extends the list_entries() unit test with an entry whose only group is environment_servers, and adds a test that compares the constant against Gym's own nemo_gym.discovery._SERVER_GROUP_KEYS so the two lists cannot drift apart again. The new test carries the nemo_gym marker because it needs an installed Gym. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: alexandery <alexandery@nvidia.com>
reinainblood
added a commit
to reinainblood/Gym
that referenced
this pull request
Oct 27, 2026
Upstream rollout dispatch now resolves benchmarks through environment_servers (NVIDIA-NeMo#3482); without a declaration gym eval run --benchmark asb cannot route rows to the ASB agent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kirsten Ruge <kirstenruge@gmail.com>
reinainblood
added a commit
to reinainblood/Gym
that referenced
this pull request
Oct 28, 2026
Upstream rollout dispatch now resolves benchmarks through environment_servers (NVIDIA-NeMo#3482); the ExploitBench agent owns the episode, so it is wired through the legacy-agent bridge like other agent-owned benchmarks. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Kirsten Ruge <kirstenruge@gmail.com>
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.
What does this PR do?
Registers
environment_serversas a first-class Gym server type for configuration, discovery, startup, addressing, status, and telemetry.Interaction flow
sequenceDiagram participant C as Rollout collector participant E as Environment Server participant R as Task / Resources Server participant A as Agent Server participant M as Model Server participant S as Task sandbox C->>E: POST /run E->>R: Seed task session R-->>E: Tool access and optional SandboxAccess E->>A: Seed agent session A->>S: Connect as borrower when supplied E->>A: Invoke /v1/responses A->>M: Model and capture requests A-->>E: Agent response E->>A: Close agent session E->>R: Verify response E->>R: Close task session E-->>C: Episode resultThe Environment Server coordinates ordering and the final result. Agent and Task/Resources Servers retain ownership of the state and resources they create.
This is part 1 of 13 in the Environment Server stack. Previous:
main. Next: #3483.Validation
uv run pytest tests/unit_tests/test_global_config.py -qRollouts
See the final PR for end-to-end rollout evidence.
Compatibility and benchmark impact
Existing Agent Server routing remains available during migration.