Repository navigation
fix(vllm_model): route a rollout's calls by rollout id - #4462
Merged
Merged
Conversation
Agents that drop cookies (verifiers_agent, tau2's client) get a new session on every model call, so each turn hashed to a random endpoint. Turns that landed on the slower endpoint stayed there longest, so rollouts piled onto one endpoint while the other idled. Key the endpoint on the rollout id when the call carries one, falling back to the session id. Signed-off-by: Wojciech Prazuch <[email protected]>
ananthsub
approved these changes
Oct 12, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/38258745730 |
7 tasks done
wprazuch
added a commit
that referenced
this pull request
Oct 21, 2026
…to gdpval-devel) (#4859) fix(vllm_model): route a rollout's calls by rollout id (backport #4462) (cherry picked from commit 75bb53e) Signed-off-by: Wojciech Prazuch <[email protected]>
7 tasks
2 of 4 tasks
7 tasks done
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.
With several vLLM endpoints in
base_url,vllm_modelpicks one by hashing the request's session id. Agents that don't keep cookies (verifiers_agent, andtau2throughNeMoGymAsyncOpenAI) get a fresh session on every model call, so each turn of a rollout lands on a random endpoint.That turns into a pile-up under load. A turn on the busier endpoint runs slower and stays there longer, so rollouts gradually collect on one endpoint while the other idles. Measured on a two-endpoint AutomationBench run: about 585 requests running on one endpoint at about 2.4 tok/s each, 3 on the other; model calls hit the agent's client timeout. Tau3 showed the same pattern, with the busy endpoint changing between restarts.
Fix:
_resolve_clientkeys the endpoint oncurrent_rollout_id()when the call carries one, falling back to the session id. A rollout's turns stay on one endpoint (prefix-cache reuse), and rollouts spread across endpoints by hash. Failover (route_around_failing_endpoints) works unchanged on the new key.Tests: calls of one rollout with different sessions pick one endpoint; 64 rollouts sharing one session spread over both endpoints; without a rollout the session still decides. The first two fail on
main.ng_test +entrypoint=responses_api_models/vllm_model: 408 passed.