Fix worker status for unusable terminal backend responses#615
Draft
ushaket wants to merge 3 commits intovllm-project:mainfrom
Draft
Fix worker status for unusable terminal backend responses#615ushaket wants to merge 3 commits intovllm-project:mainfrom
ushaket wants to merge 3 commits intovllm-project:mainfrom
Conversation
Signed-off-by: Uri Shaket <ushaket@redhat.com>
Contributor
Author
|
This introduce worker dependency on GenerationResponse, not sure if that's the right way to go, |
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.
Summary
This PR fixes a scheduler correctness bug where requests could be marked as
completedeven when the backend resolved without a usable terminal response. It adds explicit terminal-response validation in the worker so malformed/empty terminal results are surfaced aserroredwith a clear diagnostic instead of being counted as successful requests.Details
WorkerProcessto guard final status transitions.errored[UNUSABLE_BACKEND_RESPONSE] backend resolved without a usable terminal response payloadGenerationResponse-aware usability criteria:textoroutput_metrics.total_tokens > 0Noneterminal response is always unusableGenerationResponsefallback remainsbool(response)for generic/test compatibilitytests/unit/scheduler/test_worker.pyfor:erroredGenerationResponse->erroredGenerationResponsewith empty text ->completedTest Plan
uv run pytest -q tests/unit/scheduler/test_worker.py -k "terminal_response or empty_generation_response or generation_response_with_tokens or invalid_initialization"completedGenerationResponseis not markedcompletedoutput_tokens > 0) is accepted ascompletedRelated Issues
Use of AI
## WRITTEN BY AI ##)