[Bugfix] Enable V1 usage stats (#16986)

Signed-off-by: mgoin <mgoin64@gmail.com>
Signed-off-by: Nick Hill <nhill@redhat.com>
Co-authored-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Michael Goin
2025-04-23 20:54:00 -06:00
committed by GitHub
parent 46e678bcff
commit ed50f46641
5 changed files with 75 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ from vllm.v1.executor.abstract import Executor
from vllm.v1.metrics.loggers import (LoggingStatLogger, PrometheusStatLogger,
StatLoggerBase)
from vllm.v1.metrics.stats import IterationStats, SchedulerStats
from vllm.v1.utils import report_usage_stats
logger = init_logger(__name__)
@@ -114,6 +115,9 @@ class AsyncLLM(EngineClient):
except RuntimeError:
pass
# If usage stat is enabled, collect relevant info.
report_usage_stats(vllm_config, usage_context)
@classmethod
def from_vllm_config(
cls,