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
  • Loading branch information
tlrmchlsmth authored and siddharth9820 committed Sep 30, 2024
1 parent bfe30ff commit cb4aab4
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 cb4aab4

Please sign in to comment.