[Bugfix] Format kernel-import errors eagerly so warning_once does not retain them (#54098)

Signed-off-by: Zeyu Wang <zwang86@users.noreply.github.com>
Co-authored-by: Zeyu Wang <zwang86@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
zwang86
2026-09-15 16:35:54 -04:00
committed by GitHub
co-authored by Zeyu Wang mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 38ca7a899c
commit b6ce714354
3 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -365,7 +365,7 @@ class Platform:
try:
import vllm._C # noqa: F401
except ImportError as e:
logger.warning_once("Failed to import from vllm._C: %r", e)
logger.warning_once("Failed to import from vllm._C: %s", repr(e))
with contextlib.suppress(ImportError):
import vllm._moe_C_stable_libtorch # noqa: F401