[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:
co-authored by
Zeyu Wang
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
38ca7a899c
commit
b6ce714354
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user