Skip to content

Commit

Permalink
Update log to log_logger to distinguish statlogger
Browse files Browse the repository at this point in the history
  • Loading branch information
yinggeh committed Sep 19, 2024
1 parent f82e9b5 commit 46dcfad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ def __init__(self, labels: List[str], max_model_len: int):
class VllmStatLogger(VllmStatLoggerBase):
"""StatLogger is used as an adapter between vLLM stats collector and Triton metrics provider."""

def __init__(self, labels: Dict, max_model_len: int, logger) -> None:
def __init__(self, labels: Dict, max_model_len: int, log_logger) -> None:
# Tracked stats over current local logging interval.
# local_interval not used here. It's for vLLM logs to stdout.
super().__init__(local_interval=0)
self.metrics = TritonMetrics(labels, max_model_len)
self.logger = logger
self.log_logger = log_logger

# Starting the metrics thread. It allows vLLM to keep making progress
# while reporting metrics to triton metrics service.
Expand Down Expand Up @@ -268,7 +268,7 @@ def logger_loop(self):
elif command == "observe":
metric.observe(data)
else:
self.logger.log_error(f"Undefined command name: {command}")
self.log_logger.log_error(f"Undefined command name: {command}")

def finalize(self):
# Shutdown the logger thread.
Expand Down

0 comments on commit 46dcfad

Please sign in to comment.