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 Jul 23, 2024
1 parent d3940ea commit 184f772
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 184f772

Please sign in to comment.