Skip to content

Commit 9e33419

Browse files
tlrmchlsmthAlvant
authored andcommitted
[Bugfix] Fix print_warning_once's line info (vllm-project#8867)
Signed-off-by: Alvant <alvasian@yandex.ru>
1 parent bfaf2b8 commit 9e33419

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)