From 5e125e74d1b9739025ccb81106e28ce9b0dd4ea5 Mon Sep 17 00:00:00 2001 From: youkaichao Date: Thu, 3 Apr 2025 14:45:03 +0800 Subject: [PATCH] [misc] improve error message for "Failed to infer device type" (#15994) Signed-off-by: youkaichao --- vllm/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vllm/config.py b/vllm/config.py index 69cde4e362..92e887e086 100644 --- a/vllm/config.py +++ b/vllm/config.py @@ -1875,7 +1875,10 @@ class DeviceConfig: from vllm.platforms import current_platform self.device_type = current_platform.device_type if not self.device_type: - raise RuntimeError("Failed to infer device type") + raise RuntimeError( + "Failed to infer device type, please set " + "the environment variable `VLLM_LOGGING_LEVEL=DEBUG` " + "to turn on verbose logging to help debug the issue.") else: # Device type is assigned explicitly self.device_type = device