Skip to content

Commit 4670791

Browse files
committed
[Bugfix] Fix print_warning_once's line info
1 parent 68988d4 commit 4670791

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vllm/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,7 +744,8 @@ def create_kv_caches_with_random(
744744

745745
@lru_cache
746746
def print_warning_once(msg: str) -> None:
747-
logger.warning(msg)
747+
# Set the stacklevel to 2 to print the caller's line info
748+
logger.warning(msg, stacklevel=2)
748749

749750

750751
@lru_cache(maxsize=None)

0 commit comments

Comments
 (0)