[Misc] Fix Unable to detect current VLLM config. Defaulting to NHD kv cache layout warning (#20400)

Signed-off-by: NickLucche <nlucches@redhat.com>
This commit is contained in:
Nicolò Lucchesi 2025-07-03 23:56:09 +02:00 committed by GitHub
parent 78fe77534b
commit 8d775dd30a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -97,10 +97,10 @@ def get_kv_connector_cache_layout():
# used for faster transfer.
vllm_config = get_current_vllm_config()
kv_config = vllm_config.kv_transfer_config
if vllm_config.model_config is None or kv_config is None:
if kv_config is not None and vllm_config.model_config is None:
logger.warning_once("Unable to detect current VLLM config. " \
"Defaulting to NHD kv cache layout.")
else:
elif kv_config is not None:
use_mla = vllm_config.model_config.use_mla
if not use_mla and kv_config.kv_connector == "NixlConnector":
logger.info_once("NixlConnector detected. Setting KV cache " \

View File

@ -138,7 +138,7 @@ def get_kv_cache_layout():
if cache_layout is None:
cache_layout = get_kv_connector_cache_layout()
else:
logger.info_once("`FLASHINFER_KV_CACHE_LAYOUT` environment variable " \
logger.info_once("`VLLM_KV_CACHE_LAYOUT` environment variable " \
"detected. Setting KV cache layout to %s.", cache_layout)
return cache_layout