Skip to content

Commit

Permalink
[Bugfix] Fix print_warning_once's line info
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrmchlsmth committed Sep 26, 2024
1 parent 68988d4 commit 4670791
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 4670791

Please sign in to comment.