Skip to content

feat(nemo-gym): add SMG router backend - #3536

Draft
NolenLiang wants to merge 1 commit into
nliang/vllm-router-nemo-gymfrom
nliang/smg-router-nemo-gym
Draft

feat(nemo-gym): add SMG router backend#3536
NolenLiang wants to merge 1 commit into
nliang/vllm-router-nemo-gymfrom
nliang/smg-router-nemo-gym

Conversation

@NolenLiang

Copy link
Copy Markdown
Contributor

What does this PR do ?

Adds SMG 1.9.0 as a selectable NeMo Gym inference-router backend.

  • generalizes the vLLM Router process from feat(nemo-gym): route rollouts through vLLM Router #3518 into a backend-selectable inference router
  • maps each backend's launch module, supported policy names, and session-affinity header
  • validates unsupported backend/policy combinations before startup
  • routes NeMo Gym policy traffic through either vLLM Router or SMG without changing worker endpoints
  • pins SMG 1.9.0 in the nemo_gym optional dependency set

This is a stacked PR whose base is #3518, so its diff contains only the SMG integration increment.

Issues

Depends on:

Usage

Configure the router block under nemo_gym:

router:
  enabled: true
  backend: smg
  policy: consistent_hash

Set backend: vllm_router to use the vLLM Router implementation through the same configuration shape. The shared consistent_hash value maps to SMG's consistent_hashing CLI policy when SMG is selected.

Before your PR is "Ready for review"

Pre checks:

  • Read and followed the Contributor guidelines
  • Added unit coverage for both router backends, policy validation, lifecycle handling, NeMo Gym wiring, and port allocation
  • Ran the relevant unit and functional checks locally
  • Kept this first integration PR minimal; repository documentation is intentionally not included

Additional Information

Validation completed:

  • 16 relevant NeMo RL unit tests passed
  • 4 relevant NeMo Gym tests passed
  • Ruff check and format check passed
  • Pyrefly passed with 0 errors across 219 modules
  • uv lock --check passed with the repository's container-pinned UV 0.11.28
  • an SMG 1.9.0 smoke test with two mock vLLM workers verified readiness, consistent session routing, distribution across both workers, inline token-ID pass-through, and graceful shutdown with exit code 0

@copy-pr-bot

copy-pr-bot Bot commented Aug 7, 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.

@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown

❌ Submodule Fast-Forward Check Failed

Check based on commit: d45a886 (PR #3536 from nliang/smg-router-nemo-gym)

❌ Submodules that need attention:

Gym: ❌ Commits have DIVERGED from a common ancestor
TARGET (nliang/vllm-router-nemo-gym branch): https://github.com/NVIDIA-NeMo/Gym/commits/a4e16ce67f9b72cb2d48e4728a40374d12949ef5/
CURRENT (PR #3536 from nliang/smg-router-nemo-gym): https://github.com/NVIDIA-NeMo/Gym/commits/550912f2e721e80c3d608c8b2963d3e243bd0837/

Please ensure all submodule commits are fast-forwards of the nliang/vllm-router-nemo-gym branch before merging.

@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from d45a886 to 318cdf5 Compare August 7, 2026 13:46
@NolenLiang

Copy link
Copy Markdown
Contributor Author

The earlier submodule failure on d45a886b is resolved.

@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from 318cdf5 to 16ebc41 Compare August 7, 2026 14:51
@NolenLiang

Copy link
Copy Markdown
Contributor Author

/ok to test 16ebc41

@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from 16ebc41 to 7b8b7e0 Compare August 7, 2026 15:30
@NolenLiang

Copy link
Copy Markdown
Contributor Author

/ok to test 7b8b7e0

@NolenLiang
NolenLiang force-pushed the nliang/vllm-router-nemo-gym branch from 1ee6e4f to 8dc2ead Compare August 13, 2026 08:23
@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from 7b8b7e0 to 9308e16 Compare August 13, 2026 08:58
@NolenLiang
NolenLiang force-pushed the nliang/vllm-router-nemo-gym branch from 8dc2ead to ae455c6 Compare August 13, 2026 09:13
@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from 9308e16 to ab7dca8 Compare August 13, 2026 12:36
@NolenLiang
NolenLiang force-pushed the nliang/vllm-router-nemo-gym branch from ae455c6 to 4e7fc2a Compare August 13, 2026 13:12
Signed-off-by: NolenLiang <nliang@nvidia.com>
@NolenLiang
NolenLiang force-pushed the nliang/smg-router-nemo-gym branch from ab7dca8 to 6ba07c6 Compare August 13, 2026 13:30
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.

1 participant