fix(rollout): make dynamic refills granular#2218
Open
EazyReal wants to merge 1 commit into
Open
Conversation
Allow positive refill sizes smaller than the target rollout batch, and cancel unfinished non-partial generation tasks before waiting for SGLang to drain. This prevents one rejected prompt group from launching a full replacement wave or keeping the drain loop alive through new agent turns. Make the complete abort lifecycle exception-safe: failures during worker discovery, server drain, or partial collection cancel and await remaining groups before the original failure is re-raised.
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.
Problem
Dynamic sampling currently requires
over_sampling_batch_sizeto be at leastrollout_batch_size, even though the rollout state machine supports any positive refill granularity. A single rejected prompt group can therefore launch a full replacement wave.At rollout completion, non-partial generation tasks are also left running while SGLang is drained. Multi-turn custom generation can issue new requests during that drain, delaying or preventing it from reaching idle.
Change
over_sampling_batch_sizeThe existing scheduler remains unchanged: rejected groups decrement accepted-plus-pending coverage, and the configured refill granularity restores it.
Validation
python tests/test_sglang_rollout_abort.py -q— 4 passedpython .github/workflows/generate_github_workflows.pypre-commit run --all-filesgit diff --checkNo live GPU or distributed rollout was run; the affected lifecycle boundaries are covered with CPU and mocked regressions.