[Log] Update to log once (#46511)

Signed-off-by: yewentao256 <zhyanwentao@126.com>
Co-authored-by: TJian <tunjian.tan@embeddedllm.com>
This commit is contained in:
Wentao Ye
2026-06-24 14:45:16 +00:00
committed by GitHub
co-authored by TJian
parent 24d5186138
commit 007b5a52ed
4 changed files with 23 additions and 21 deletions
+3 -3
View File
@@ -355,7 +355,7 @@ class Platform:
try:
import vllm._C # noqa: F401
except ImportError as e:
logger.warning("Failed to import from vllm._C: %r", e)
logger.warning_once("Failed to import from vllm._C: %r", e)
with contextlib.suppress(ImportError):
import vllm._moe_C_stable_libtorch # noqa: F401
@@ -859,7 +859,7 @@ class Platform:
# Pinned memory support under WSL depends on the vendor and driver
# version. Conservative default: return False. Platform subclasses
# that can verify support (e.g. CudaPlatformBase) override this.
logger.warning(
logger.warning_once(
"Using 'pin_memory=False' as WSL is detected. "
"This may slow down performance."
)
@@ -1003,7 +1003,7 @@ class Platform:
if attr is not None:
return attr
logger.warning(
logger.warning_once(
"Current platform %s does not have '%s' attribute.",
self.device_type,
key,