Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: vLLM metrics optimization #66

Merged
merged 3 commits into from
Sep 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update log to log_logger to distinguish statlogger
yinggeh committed Sep 19, 2024
commit 46dcfadd9526bbd41cdadc3a282aa5ff70387b5d
6 changes: 3 additions & 3 deletions src/utils/metrics.py
Original file line number Diff line number Diff line change
@@ -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.
@@ -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.