[Bugfix] Fix inappropriate content of model_name tag in Prometheus metrics (#3937)

This commit is contained in:
DearPlanet
2024-05-05 06:39:34 +08:00
committed by GitHub
parent 021b1a2ab7
commit 4302987069
5 changed files with 76 additions and 14 deletions

View File

@@ -106,7 +106,7 @@ class LLMEngine:
"tensor_parallel_size=%d, disable_custom_all_reduce=%s, "
"quantization=%s, enforce_eager=%s, kv_cache_dtype=%s, "
"quantization_param_path=%s, device_config=%s, "
"decoding_config=%r, seed=%d)",
"decoding_config=%r, seed=%d, served_model_name=%s)",
vllm.__version__,
model_config.model,
speculative_config,
@@ -129,6 +129,7 @@ class LLMEngine:
device_config.device,
decoding_config,
model_config.seed,
model_config.served_model_name,
)
# TODO(woosuk): Print more configs in debug mode.
@@ -219,7 +220,7 @@ class LLMEngine:
if self.log_stats:
self.stat_logger = StatLogger(
local_interval=_LOCAL_LOGGING_INTERVAL_SEC,
labels=dict(model_name=model_config.model),
labels=dict(model_name=model_config.served_model_name),
max_model_len=self.model_config.max_model_len)
self.stat_logger.info("cache_config", self.cache_config)