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

[V1][Metrics] Hook up IterationStats for Prometheus metrics #12478

Merged

Conversation

markmc
Copy link
Contributor

@markmc markmc commented Jan 27, 2025

Follow on from #12416, part of #10582

Pass IterationStats to the stat logger, and log them in both the logging and prometheus loggers.

For the logging stat logger, we need to calculate the throughput based on the number of tokens in the particular logging interval.

In the prometheus logger, we just need to record the prompt and generation tokens in a counter.

Note, v0 had a vllm:tokens_total counter registered that apparently was never logged to, so I've omitted it in v1.

Follow on from vllm-project#12416

Pass IterationStats to the stat logger, and log them in
both the logging and prometheus loggers.

For the logging stat logger, we need to calculate the
throughput based on the number of tokens in the particular
logging interval.

In the prometheus logger, we just need to record the
prompt and generation tokens in a counter.

Note, v0 had a vllm:tokens_total counter registered that
apparently was never logged to, so I've omitted it in v1.

Signed-off-by: Mark McLoughlin <[email protected]>
Copy link

👋 Hi! Thank you for contributing to the vLLM project.
Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can do one of these:

  • Add ready label to the PR
  • Enable auto-merge.

🚀

@markmc markmc changed the title [V1][Metrics] Hook up IterationStats [V1][Metrics] Hook up IterationStats for Prometheus metrics Jan 27, 2025
@robertgshaw2-redhat
Copy link
Collaborator

LGTM

@robertgshaw2-redhat robertgshaw2-redhat added the ready ONLY add when PR is ready to merge/full CI is needed label Jan 28, 2025
@robertgshaw2-redhat robertgshaw2-redhat enabled auto-merge (squash) January 28, 2025 15:08
@robertgshaw2-redhat robertgshaw2-redhat merged commit 3fd1fb6 into vllm-project:main Jan 28, 2025
62 checks passed
rasmith pushed a commit to rasmith/vllm that referenced this pull request Jan 30, 2025
Isotr0py pushed a commit to Isotr0py/vllm that referenced this pull request Feb 2, 2025
@markmc markmc deleted the metrics-v1-prometheus-logger-2 branch February 5, 2025 11:52
NickLucche pushed a commit to NickLucche/vllm that referenced this pull request Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready ONLY add when PR is ready to merge/full CI is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants