Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: vLLM metrics optimization #66

Merged
merged 3 commits into from
Sep 21, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix L0_multi_gpu
yinggeh committed Sep 20, 2024
commit 8fbc234ec1c5db1432f13c6972185a2f53a15903
4 changes: 3 additions & 1 deletion src/model.py
Original file line number Diff line number Diff line change
@@ -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.