[Misc] Move print_*_once from utils to logger (#11298)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
Co-authored-by: Maxime Fournioux <55544262+mfournioux@users.noreply.github.com>
This commit is contained in:
Cyrus Leung
2025-01-09 12:48:12 +08:00
committed by GitHub
parent 730e9592e9
commit d848800e88
21 changed files with 129 additions and 72 deletions

View File

@@ -696,18 +696,6 @@ def create_kv_caches_with_random(
return key_caches, value_caches
@lru_cache
def print_info_once(msg: str) -> None:
# Set the stacklevel to 2 to print the caller's line info
logger.info(msg, stacklevel=2)
@lru_cache
def print_warning_once(msg: str) -> None:
# Set the stacklevel to 2 to print the caller's line info
logger.warning(msg, stacklevel=2)
@lru_cache(maxsize=None)
def is_pin_memory_available() -> bool:
from vllm.platforms import current_platform