From d2fcc64fa2c4c1973891f0dbba94c80288afc072 Mon Sep 17 00:00:00 2001 From: Andrew Feldman Date: Wed, 8 Jan 2025 10:26:30 +0000 Subject: [PATCH] further stripped down scheduler code Signed-off-by: Andrew Feldman --- vllm/v1/core/scheduler.py | 6 +----- vllm/v1/engine/__init__.py | 8 ++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/vllm/v1/core/scheduler.py b/vllm/v1/core/scheduler.py index 7c6c6183fadab..9431e1903d5bf 100644 --- a/vllm/v1/core/scheduler.py +++ b/vllm/v1/core/scheduler.py @@ -460,11 +460,7 @@ def update_from_output( new_token_ids=request.output_token_ids[-num_new_tokens:], finished=request.is_finished(), finish_reason=request.get_finished_reason(), - stop_reason=request.stop_reason, - logprobs_token_ids=[], - logprobs=[], - prompt_logprobs_token_ids=None, - prompt_logprobs=None) + stop_reason=request.stop_reason) engine_core_outputs.append(output) # Breakout of the loop. diff --git a/vllm/v1/engine/__init__.py b/vllm/v1/engine/__init__.py index be6c7a441eaab..2e3943b81e544 100644 --- a/vllm/v1/engine/__init__.py +++ b/vllm/v1/engine/__init__.py @@ -41,11 +41,11 @@ class EngineCoreOutput( request_id: str new_token_ids: List[int] - logprobs: List[torch.Tensor] - logprobs_token_ids: List[torch.Tensor] - prompt_logprobs: Optional[torch.Tensor] - prompt_logprobs_token_ids: Optional[torch.Tensor] finished: bool + logprobs: List[torch.Tensor] = [] + logprobs_token_ids: List[torch.Tensor] = [] + prompt_logprobs: Optional[torch.Tensor] = None + prompt_logprobs_token_ids: Optional[torch.Tensor] = None finish_reason: Optional[str] = None stop_reason: Union[int, str, None] = None