From 4f074fbf53f9e11a57a4c3d8b084796d155a270a Mon Sep 17 00:00:00 2001 From: dpxa Date: Tue, 24 Dec 2024 16:43:39 +0800 Subject: [PATCH] =?UTF-8?q?[Misc]Suppress=20irrelevant=20exception=20stack?= =?UTF-8?q?=20trace=20information=20when=20CUDA=E2=80=A6=20(#11438)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: shiquan --- vllm/entrypoints/llm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vllm/entrypoints/llm.py b/vllm/entrypoints/llm.py index 830f54c6a8afa..fadf297e9f6aa 100644 --- a/vllm/entrypoints/llm.py +++ b/vllm/entrypoints/llm.py @@ -233,7 +233,8 @@ def __init__( self.request_counter = Counter() def __del__(self): - if self.llm_engine and hasattr(self.llm_engine, "shutdown"): + if hasattr(self, 'llm_engine') and self.llm_engine and hasattr( + self.llm_engine, "shutdown"): self.llm_engine.shutdown() @staticmethod