Add per-request status info for MLLM scheduler#257
Closed
janhilgard wants to merge 1 commit intowaybarrios:mainfrom
Closed
Add per-request status info for MLLM scheduler#257janhilgard wants to merge 1 commit intowaybarrios:mainfrom
janhilgard wants to merge 1 commit intowaybarrios:mainfrom
Conversation
The MLLM scheduler was missing get_running_requests_info(), so /v1/status always returned an empty requests array for MLLM models. This made it impossible to see real-time per-request progress (completion_tokens, tokens_per_second, TTFT) during streaming. Changes: - Add first_token_time field to MLLMRequest for TTFT tracking - Add get_running_requests_info() to MLLMScheduler (mirrors scheduler.py) - Include requests in get_stats() output - Promote scheduler stats (num_running, num_waiting, total tokens, requests) to top-level in BatchedEngine.get_stats() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
Author
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
get_running_requests_info(), so/v1/statusalways returned"requests": []for MLLM models (all--mllmservers)get_running_requests_info()toMLLMScheduler(mirrors the existing implementation inscheduler.py) and promoted scheduler stats to top-level inBatchedEngine.get_stats()Changes
mllm_scheduler.py: Addfirst_token_timetoMLLMRequest, record it on first generated token, addget_running_requests_info()returning per-requestcompletion_tokens,tokens_per_second,progress,ttft_s,phaseengine/batched.py: Promotenum_running,num_waiting,total_prompt_tokens,total_completion_tokens,requests(and other keys) frommllm_statsto top-level statsTest plan
--mllmflag)max_tokens/v1/statusduring generation — verifyrequestsarray contains per-request details with increasingcompletion_tokensand non-nulltokens_per_secondnum_runningandtotal_completion_tokensare visible at top-level in/v1/status🤖 Generated with Claude Code