Skip to content

Commit

Permalink
[Bugfix] Fix print_warning_once's line info (vllm-project#8867)
Browse files Browse the repository at this point in the history
Signed-off-by: Sumit Dubey <sumit.dubey2@ibm.com>
  • Loading branch information
tlrmchlsmth authored and sumitd2 committed Nov 14, 2024
1 parent c66ce70 commit 5c9c49a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vllm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,8 @@ def create_kv_caches_with_random(

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


@lru_cache(maxsize=None)
Expand Down

0 comments on commit 5c9c49a

Please sign in to comment.