Skip to content

Commit

Permalink
[Bugfix] Fix print_warning_once's line info (#8867)
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrmchlsmth authored Sep 26, 2024
1 parent b28d210 commit e2f6f26
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 e2f6f26

Please sign in to comment.