Skip to content

Commit fdfb6aa

Browse files
tlrmchlsmthLeiWang1999
authored andcommitted
[Bugfix] Fix print_warning_once's line info (vllm-project#8867)
Signed-off-by: LeiWang1999 <leiwang1999@outlook.com>
1 parent 7456c79 commit fdfb6aa

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)