fix(scheduler): preserve prefill error outputs during decode#1622
Merged
Conversation
Owner
|
Thanks, this matches the scheduler output assembly bug from #1621. I verified that the current scheduler can drop a prefill rejection output when decode responses are produced in the same step, and this change preserves the terminal error output by appending decode outputs instead of replacing the list. The regression test covers the exact mixed rejection/decode case, and the scheduler test suite passes on the merged tree. This looks good to me, and I'm going to merge it. |
Contributor
Author
|
Thanks for addressing this issue so quickly. I really appreciate your amazing work on the project 👍 |
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.
Closes #1621
Summary
step().Why
When prefill failed,
_schedule_waiting()could return a terminal errorRequestOutputfor the failed request. If another request produced decode output in the sameScheduler.step(), the decode path replacedoutput.outputsinstead of appending to it, dropping the prefill error output.That left the failed request removed from scheduler state but without a finished output delivered to
engine_core, so the client could wait indefinitely with no tokens and no error.Changes
Scheduler.step()to append decode outputs withoutput.outputs.extend(outputs).output.finished_request_ids.update(finished_ids).TestSchedulerStepOutputs.test_decode_outputs_preserve_prefill_rejections.Tests
Result:
Also verified the new regression test fails when the scheduler fix is reverted.