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: Amit Garg <mitgarg17495@gmail.com>
  • Loading branch information
tlrmchlsmth authored and garg-amit committed Oct 28, 2024
1 parent ef2673a commit 854a9dd
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 854a9dd

Please sign in to comment.