mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 12:05:57 +08:00
[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>
This commit is contained in:
parent
620db1fc58
commit
e680723eba
@ -143,6 +143,7 @@ class AsyncLLM(EngineClient):
|
||||
engine_idxs=self.engine_core.engine_ranks_managed,
|
||||
custom_stat_loggers=stat_loggers,
|
||||
enable_default_loggers=log_stats,
|
||||
client_count=client_count,
|
||||
)
|
||||
self.logger_manager.log_engine_initialized()
|
||||
|
||||
|
||||
@ -652,6 +652,7 @@ class StatLoggerManager:
|
||||
engine_idxs: Optional[list[int]] = None,
|
||||
custom_stat_loggers: Optional[list[StatLoggerFactory]] = None,
|
||||
enable_default_loggers: bool = True,
|
||||
client_count: int = 1,
|
||||
):
|
||||
self.engine_idxs = engine_idxs if engine_idxs else [0]
|
||||
|
||||
@ -660,7 +661,12 @@ class StatLoggerManager:
|
||||
factories.extend(custom_stat_loggers)
|
||||
|
||||
if enable_default_loggers and logger.isEnabledFor(logging.INFO):
|
||||
factories.append(LoggingStatLogger)
|
||||
if client_count > 1:
|
||||
logger.warning(
|
||||
"AsyncLLM created with api_server_count more than 1; "
|
||||
"disabling stats logging to avoid incomplete stats.")
|
||||
else:
|
||||
factories.append(LoggingStatLogger)
|
||||
|
||||
# engine_idx: StatLogger
|
||||
self.per_engine_logger_dict: dict[int, list[StatLoggerBase]] = {}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user