Skip to content

refactor: decouple rollout identity from capture - #2783

Open
ananthsub wants to merge 7 commits into
NVIDIA-NeMo:mainfrom
ananthsub:ansubramania/rollout-identity
Open

refactor: decouple rollout identity from capture#2783
ananthsub wants to merge 7 commits into
NVIDIA-NeMo:mainfrom
ananthsub:ansubramania/rollout-identity

Conversation

@ananthsub

@ananthsub ananthsub commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • establish rollout correlation for every identifiable agent run, independent of observability and training-token capture
  • propagate the active rollout ID through internal model and resources-server requests even when observability is disabled
  • keep capture feature gates responsible only for recording behavior and the dedicated training-token path

This provides a stable runtime identity for features such as #2141 without requiring model-call observability.

Test plan

  • uv run pytest tests/unit_tests/test_base_responses_api_agent.py tests/unit_tests/test_base_responses_api_model.py tests/unit_tests/test_server_utils.py tests/unit_tests/test_rollout_collection.py -q (201 passed)
  • uv run pre-commit run --all-files

Propagate rollout correlation through agents, model servers, and resources servers even when observability and training-token capture are disabled, so runtime features can rely on one stable identity.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
Mint and persist UUIDv4 rollout IDs so correlation remains stable across retries and independent of task indexing.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@ananthsub
ananthsub force-pushed the ansubramania/rollout-identity branch from 328f1e7 to dbb568b Compare August 26, 2026 16:10
@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@ananthsub

Copy link
Copy Markdown
Contributor Author

/ok to test dbb568b

Update agent behavior and fixtures for mandatory UUID rollout IDs while keeping observability controlled by its explicit configuration.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
…t-identity

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>

# Conflicts:
#	nemo_gym/rollout_collection.py
#	responses_api_agents/mini_swe_agent_2/tests/test_app.py
@github-actions github-actions Bot added the sla:review-overdue Review response is over the one-business-day SLA label Aug 27, 2026
Keep Gym coordination metadata on every BaseRunRequest so strict UUID validation works across all agent implementations, and update affected fixtures to exercise UUID-prefixed model calls.

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
…t-identity

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>

# Conflicts:
#	responses_api_agents/swe_agents/app.py
#	responses_api_agents/swe_agents/tests/test_app.py
@ananthsub

Copy link
Copy Markdown
Contributor Author

/ok to test 4b8e0db

…t-identity

Signed-off-by: Ananth Subramaniam <ansubramania@nvidia.com>
@ananthsub
ananthsub force-pushed the ansubramania/rollout-identity branch from ecbd5a7 to 057f4bc Compare August 28, 2026 20:46
waple0820 added a commit to waple0820/Gym that referenced this pull request Sep 2, 2026
…rify

NVIDIA-NeMo#2114 landed the rollout correlation contract, but it is one-directional. The
training side learns nothing about the handle the environment actually allocated
— the container, the browser context, the provider session that consumed quota —
so a rollout record and a provider-side log can only be joined on a timestamp.

`env_session_id` is optional on both `BaseSeedSessionResponse` and
`BaseVerifyResponse`, opaque to Gym, and absent unless an environment reports one,
so nothing changes for an environment that does not.

This originally also added a `rollout_correlation_enabled` key so the rollout
prefix could reach resources servers without turning on model-call capture. NVIDIA-NeMo#2783
removes that need by making correlation independent of the observability gate
rather than adding a second flag, which is the better shape, so that half is
dropped here.

No training framework needs a transport change: verl and NeMo-RL already carry the
whole verify response as `full_result`.

Terminology: this is the environment session created by `/seed_session`, not the
vLLM router KV-cache affinity of NVIDIA-NeMo#2570 / NVIDIA-NeMo#2347 / NVIDIA-NeMo#2369.

Signed-off-by: waple0820 <232305951+waple0820@users.noreply.github.com>
@waple0820

Copy link
Copy Markdown

This removes the need for half of #2613, which added a rollout_correlation_enabled key so the prefix could reach resources servers without turning on capture. Dropping the flag from that PR — making correlation independent of the gate is the better shape than a second key.

What's left there is the other direction: env_session_id carries the environment's own handle back out on seed and verify. This PR gets the rollout id into the resources server; without the return trip a rollout record and a provider-side log still only join on a timestamp.

@ananthsub

Copy link
Copy Markdown
Contributor Author

Related to the performance roadmap in #2998. Stable rollout identity is compatibility groundwork for in-process agent calls (#3012) and multi-worker agent serving (#3014). This PR does not itself implement either optimization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: decouple rollout identity from capture

2 participants