Skip to content

Commit

Permalink
Update vllm/engine/llm_engine.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Yard1 authored and AllenDou committed Jul 24, 2024
1 parent 4c9ef39 commit d097cba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,10 @@ def do_log_stats(
scheduler_outputs: Optional[SchedulerOutputs] = None,
model_output: Optional[List[SamplerOutput]] = None) -> None:
"""Forced log when no requests active."""
stats = self._get_stats(scheduler_outputs, model_output)
for logger in self.stat_loggers.values():
logger.log(stats)
if self.log_stats:
stats = self._get_stats(scheduler_outputs, model_output)
for logger in self.stat_loggers.values():
logger.log(stats)

def _get_stats(
self,
Expand Down

0 comments on commit d097cba

Please sign in to comment.