Skip to content

feat: forward rollout session IDs to Dynamo - #3856

Open
jthomson04 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
jthomson04:jthomson04/dynamo-session-id-forwarding
Open

feat: forward rollout session IDs to Dynamo#3856
jthomson04 wants to merge 2 commits into
NVIDIA-NeMo:mainfrom
jthomson04:jthomson04/dynamo-session-id-forwarding

Conversation

@jthomson04

@jthomson04 jthomson04 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

What does this PR do ?

Forward stable rollout session IDs to Dynamo for NeMo-Gym and direct NeMo-RL rollouts.

  • NeMo-Gym reuses its stable session UUID and sends it through the Dynamo token wrapper.
  • Direct rollouts create one UUID per trajectory attempt and reuse it across turns and HTTP retries.
  • Sibling trajectories and complete-trajectory retries receive different IDs.
  • Only Dynamo receives X-Dynamo-Session-ID; other backends and Dynamo routing policy are unchanged.
  • Pin Gym to NVIDIA-NeMo/Gym@cc8ec02281a590ff9e5111acae8d70fe1dd354ab for optional session-header support.

This PR is transport-only. Session affinity remains opt-in through the existing frontend_args.extra_cli_args escape hatch. It does not add an affinity default, tracing controls, or a new routing policy.

Issues

None.

Usage

No user configuration is required for header forwarding. Dynamo-backed Gym and direct rollouts add the session header automatically. Users who want session affinity can configure the existing Dynamo frontend CLI escape hatch.

Before your PR is "Ready for review"

Pre checks:

  • Read and followed the contributor guidelines.
  • Added focused tests for Gym configuration, wrapper forwarding, direct rollout identity, and Dynamo HTTP forwarding.
  • Functional and GPU tests were not run. The focused CPU unit tests pass.
  • No documentation update is required because this does not add a user-facing option.

Additional Information

Validation:

  • Gym VLLM model test file: 126 passed.
  • NeMo-RL affected unit-test files: 138 passed.
  • Scoped Gym and NeMo-RL pre-commit checks passed, including pyrefly.
  • uv sync --locked passed.
  • The new Gym pin is a fast-forward from the current upstream NeMo-RL Gym pin.
  • A fresh fetch of the exact Gym SHA from the official Gym URL passed.
  • No GPU test was run.

@copy-pr-bot

copy-pr-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown

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.

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 6ef3f99 (PR #3856 from jthomson04/dynamo-session-id-forwarding)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
Signed-off-by: jthomson04 <jwillthomson19@gmail.com>
@jthomson04
jthomson04 force-pushed the jthomson04/dynamo-session-id-forwarding branch from 6ef3f99 to 2af6e1b Compare August 26, 2026 23:52
@jthomson04 jthomson04 added the CI:L0 Run doctests and unit tests label Aug 26, 2026
@jthomson04

Copy link
Copy Markdown
Contributor Author

/ok to test 2af6e1b

@jthomson04
jthomson04 marked this pull request as ready for review August 27, 2026 23:23
@jthomson04
jthomson04 requested review from a team as code owners August 27, 2026 23:23
@copy-pr-bot

copy-pr-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

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

Labels

CI:L0 Run doctests and unit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant