From 8fbc234ec1c5db1432f13c6972185a2f53a15903 Mon Sep 17 00:00:00 2001 From: Yingge He Date: Fri, 20 Sep 2024 01:50:08 -0700 Subject: [PATCH] Fix L0_multi_gpu --- src/model.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/model.py b/src/model.py index 6a6c0e45..eff42bc6 100644 --- a/src/model.py +++ b/src/model.py @@ -161,6 +161,7 @@ def init_engine(self): self.llm_engine = AsyncLLMEngine.from_engine_args(aync_engine_args) # Create vLLM custom metrics + self.vllm_metrics = None if ( "REPORT_CUSTOM_METRICS" in self.model_config["parameters"] and self.model_config["parameters"]["REPORT_CUSTOM_METRICS"]["string_value"] @@ -574,7 +575,8 @@ def finalize(self): self._response_thread = None # Shutdown the logger thread. - self.vllm_metrics.finalize() + if self.vllm_metrics is not None: + self.vllm_metrics.finalize() # When using parallel tensors, the stub process may not shutdown due to # unreleased references, so manually run the garbage collector once.