[Misc]Suppress irrelevant exception stack trace information when CUDA… (#11438)

Co-authored-by: shiquan <shiquan>
This commit is contained in:
dpxa
2024-12-24 08:43:39 +00:00
committed by GitHub
co-authored by shiquan <shiquan>
parent a491d6f535
commit 4f074fbf53
+2 -1
View File
@@ -233,7 +233,8 @@ class LLM:
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