From f09c5feb7c66340e35c06aba37478cce74c20c10 Mon Sep 17 00:00:00 2001 From: Tyler Michael Smith Date: Tue, 6 Jan 2026 22:48:13 -0500 Subject: [PATCH] Change warning in get_current_vllm_config to report caller's line number (#31855) Signed-off-by: Tyler Michael Smith --- vllm/config/vllm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 30a242335..1cf741006 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -1444,7 +1444,9 @@ def get_current_vllm_config() -> VllmConfig: # in ci, usually when we test custom ops/modules directly, # we don't set the vllm config. In that case, we set a default # config. - logger.warning("Current vLLM config is not set.") + # Use stack level 2 so the log contains the line of the caller, + # so it's easier to track down the source of the warning. + logger.warning("Current vLLM config is not set.", stacklevel=2) return VllmConfig() return _current_vllm_config