Repository navigation
Conversation
…t calls in flight With several base_url endpoints, vllm_model picks a session's endpoint by a hash of the session key. That evens out how many sessions each endpoint is given over a run, not how many it serves at once: sessions last for different times, so one endpoint can serve several times the sessions of another for hours. In a 60-hour training run with two engines and 96 rollouts in flight, the engines' open rollouts differed by 13 on average and by 45 at worst. session_assignment: fewest_calls_in_flight gives a new session to the endpoint with the fewest engine calls in flight; the hash picks among endpoints that tie. The session keeps that endpoint for all its calls, as before. The server prints each session's endpoint, which can no longer be computed from the key. The default, hash, is unchanged. With route_around_failing_endpoints, a failed endpoint takes a new session only as its trial call, and a session moved off a failed endpoint returns to the endpoint it was first given once that serves again, as it returns to its hashed endpoint today. The counts are one process's, so the setting is refused with more than one worker. Signed-off-by: Corey Hu <corey.hu@scale.com>
This branch has not been 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?
With several
base_urlendpoints,vllm_modelpicks a session's endpoint by a hash of the session key. That evens out how many sessions each endpoint is given over a run, not how many it serves at once. Sessions last for different times, so one endpoint can serve several times the sessions of another for hours.session_assignment: fewest_calls_in_flightgives a new session to the endpoint with the fewest engine calls in flight; the hash picks among endpoints that tie. The session keeps that endpoint for all its calls, as before. The default,hash, is unchanged.route_around_failing_endpoints: a failed endpoint takes a new session only as its trial call, and a session moved off a failed endpoint returns to the endpoint it was first given.No issue is linked. I can open one first if you would rather discuss the setting there.
Validation
pytest responses_api_models/vllm_model/tests/test_app.py: 799 passed (790 on main, 9 new).route_around_failing_endpointsfail when that handling is removed.ruff checkandruff format --checkon the changed files.Rollouts
N/A: no environment or agent code changes. The evidence for the rule is a replay of a recorded 60-hour training run (two engines, 96 rollouts in flight, 4,388 rollouts): open rollouts per engine differed by 13.3 on average and 45 at worst with the hash, and by 1.8 and 12 with this rule.
Compatibility and benchmark impact
None by default: the setting is opt-in. With it on, which endpoint serves a session depends on load, so the server prints each session's endpoint.
Checklist
pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).