Skip to content

Commit cf4cd53

Browse files
authored
[Misc] Add logger.exception for TPU information collection failures (#20510)
Signed-off-by: reidliu41 <[email protected]>
1 parent 32c9be2 commit cf4cd53

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vllm/usage/usage_lib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@
2020

2121
import vllm.envs as envs
2222
from vllm.connections import global_http_connection
23+
from vllm.logger import init_logger
2324
from vllm.utils import cuda_device_count_stateless, cuda_get_device_properties
2425
from vllm.version import __version__ as VLLM_VERSION
2526

27+
logger = init_logger(__name__)
28+
2629
_config_home = envs.VLLM_CONFIG_ROOT
2730
_USAGE_STATS_JSON_PATH = os.path.join(_config_home, "usage_stats.json")
2831
_USAGE_STATS_DO_NOT_TRACK_PATH = os.path.join(_config_home, "do_not_track")
@@ -183,7 +186,7 @@ def _report_usage_once(self, model_architecture: str,
183186
self.gpu_memory_per_device = (
184187
torch_xla.core.xla_model.get_memory_info()["bytes_limit"])
185188
except Exception:
186-
pass
189+
logger.exception("Failed to collect TPU information")
187190
self.provider = _detect_cloud_provider()
188191
self.architecture = platform.machine()
189192
self.platform = platform.platform()

0 commit comments

Comments
 (0)