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

Update metrics command #53

Merged
merged 15 commits into from
Mar 18, 2025
Merged

Update metrics command #53

merged 15 commits into from
Mar 18, 2025

Conversation

amrit110
Copy link
Member

@amrit110 amrit110 commented Feb 28, 2025

PR Type

Feature/Fix

Short Description

  • Fix the metrics command to use the metrics endpoint which is supported by vllm

When the server is not yet ready and if the command is used:

unavailable

If server is available, then it looks like:

working

Note that the prompt and throughput rates are calculated by us and not provided by the metrics endpoint.

Computed metrics:

  1. Prompt throughput (tokens/s)
  2. Generation throughput (tokens/s)
  3. Avg. Request latency (s)
  4. Total prompt tokens (this is a sum from all requests)
  5. Total generation tokens (this is a sum from all requests)
  6. Successful requests

Note that the throughput is calculated over every second when the fetch_metrics() method is called while refreshing the TUI. It then displays the last computed value of throughout instead of reverting to 0.0 even when no requests are being served. If new requests get served, then the throughput is re-computed and updated.

Tests Added

...

@amrit110 amrit110 requested a review from XkunW February 28, 2025 19:55
@XkunW XkunW merged commit 4003f71 into develop Mar 18, 2025
6 checks passed
@XkunW XkunW deleted the update_metrics_command branch March 18, 2025 20:57
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 77.27273% with 25 lines in your changes missing coverage. Please review.

Project coverage is 79.50%. Comparing base (ecb6d88) to head (a1c07d3).
Report is 24 commits behind head on develop.

Files with missing lines Patch % Lines
vec_inf/cli/_helper.py 73.95% 25 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #53      +/-   ##
===========================================
+ Coverage    74.83%   79.50%   +4.67%     
===========================================
  Files            4        4              
  Lines          445      522      +77     
===========================================
+ Hits           333      415      +82     
+ Misses         112      107       -5     
Files with missing lines Coverage Δ
vec_inf/cli/_cli.py 82.41% <100.00%> (+19.91%) ⬆️
vec_inf/cli/_utils.py 86.51% <ø> (+0.10%) ⬆️
vec_inf/cli/_helper.py 74.84% <73.95%> (+3.28%) ⬆️

Impacted file tree graph

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants