diff --git a/vllm/engine/async_llm_engine.py b/vllm/engine/async_llm_engine.py index 431a535397caa..108e57fe3c456 100644 --- a/vllm/engine/async_llm_engine.py +++ b/vllm/engine/async_llm_engine.py @@ -217,10 +217,16 @@ async def step_async(self) -> List[RequestOutput]: else: output = [] - return self._process_model_outputs( + request_outputs = self._process_model_outputs( output, scheduler_outputs.scheduled_seq_groups, scheduler_outputs.ignored_seq_groups) + # Log stats. + if self.log_stats: + self.stat_logger.log(self._get_stats(scheduler_outputs)) + + return request_outputs + async def encode_request_async( self, request_id: str, # pylint: disable=unused-argument