A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix] Disable the statslogger if the api_server_count is greater than 1 (#22227)
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com> Co-authored-by: Nick Hill <nhill@redhat.com>
Chauncey committed
Sep 9, 2025 at 06:28 UTC
e680723eba82c8f486dfb8ba00f72cccb6be5727
2 files changed
+8
-1
vllm/v1/engine/async_llm.py
+1
@@ -143,6 +143,7 @@ class AsyncLLM(EngineClient):
143
engine_idxs=self.engine_core.engine_ranks_managed,
144
custom_stat_loggers=stat_loggers,
145
enable_default_loggers=log_stats,
146
+ client_count=client_count,
147
)
148
self.logger_manager.log_engine_initialized()
149
vllm/v1/metrics/loggers.py
+7
-1
@@ -652,6 +652,7 @@ class StatLoggerManager:
652
engine_idxs: Optional[list[int]] = None,
653
custom_stat_loggers: Optional[list[StatLoggerFactory]] = None,
654
enable_default_loggers: bool = True,
655
+ client_count: int = 1,
656
):
657
self.engine_idxs = engine_idxs if engine_idxs else [0]
658
@@ -660,7 +661,12 @@ class StatLoggerManager:
661
factories.extend(custom_stat_loggers)
662
663
if enable_default_loggers and logger.isEnabledFor(logging.INFO):
663
- factories.append(LoggingStatLogger)
664
+ if client_count > 1:
665
+ logger.warning(
666
+ "AsyncLLM created with api_server_count more than 1; "
667
+ "disabling stats logging to avoid incomplete stats.")
668
+ else:
669
+ factories.append(LoggingStatLogger)
670
671
# engine_idx: StatLogger
672
self.per_engine_logger_dict: dict[int, list[StatLoggerBase]] = {}