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

feat: Add vLLM metrics (counter and gauge) access through Triton #375

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
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
18 changes: 18 additions & 0 deletions src/pb_stub.cc
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,24 @@ Stub::Initialize(bi::managed_external_buffer::handle_t map_handle)
model_config_params[pair.first.c_str()] = pair.second;
}

// Set metrics_mode value based on the build flag.
#ifdef TRITON_ENABLE_METRICS
#if defined(TRITON_ENABLE_METRICS_CPU) && defined(TRITON_ENABLE_METRICS_GPU)
model_config_params["metrics_mode"] = "all";
#else // defined(TRITON_ENABLE_METRICS_CPU) &&
// defined(TRITON_ENABLE_METRICS_GPU)
#ifdef TRITON_ENABLE_METRICS_CPU
model_config_params["metrics_mode"] = "cpu";
#endif // TRITON_ENABLE_METRICS_CPU
#ifdef TRITON_ENABLE_METRICS_GPU
model_config_params["metrics_mode"] = "gpu";
#endif // TRITON_ENABLE_METRICS_GPU
#endif // defined(TRITON_ENABLE_METRICS_CPU) &&
// defined(TRITON_ENABLE_METRICS_GPU)
#else // TRITON_ENABLE_METRICS
model_config_params["metrics_mode"] = "off";
#endif // TRITON_ENABLE_METRICS

LaunchStubToParentQueueMonitor();
LaunchParentToStubQueueMonitor();

Expand Down
Loading