@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / cf4cd53982
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 03:30 UTC

[Misc] Add logger.exception for TPU information collection failures (#20510)

Signed-off-by: reidliu41 <reid201711@gmail.com>

Reid committed Jul 5, 2025 at 22:24 UTC cf4cd53982161cb67c86b69f4a319625b231b0bd
1 file changed +4 -1
vllm/usage/usage_lib.py
+4 -1
@@ -20,9 +20,12 @@ import torch
20
21 import vllm.envs as envs
22 from vllm.connections import global_http_connection
23 +from vllm.logger import init_logger
24 from vllm.utils import cuda_device_count_stateless, cuda_get_device_properties
25 from vllm.version import __version__ as VLLM_VERSION
26
27 +logger = init_logger(__name__)
28 +
29 _config_home = envs.VLLM_CONFIG_ROOT
30 _USAGE_STATS_JSON_PATH = os.path.join(_config_home, "usage_stats.json")
31 _USAGE_STATS_DO_NOT_TRACK_PATH = os.path.join(_config_home, "do_not_track")
@@ -183,7 +186,7 @@ class UsageMessage:
186 self.gpu_memory_per_device = (
187 torch_xla.core.xla_model.get_memory_info()["bytes_limit"])
188 except Exception:
186 - pass
189 + logger.exception("Failed to collect TPU information")
190 self.provider = _detect_cloud_provider()
191 self.architecture = platform.machine()
192 self.platform = platform.platform()