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] Support vllm:cache_config_info #13299

Merged
merged 1 commit into from
Feb 22, 2025

Conversation

markmc
Copy link
Collaborator

@markmc markmc commented Feb 14, 2025

Part of #10582

prometheus_client has support for Info metrics which are equivalent to a Gauge whose value is permanently set to 1, but exposes interesting key/value pair information via labels. This is used for information about an instance that does not change - so it only needs to be observed at startup - and allows comparing across instances in Prometheus.

We use this concept for the vllm:cache_config_info metric:

vllm:cache_config_info{block_size="16",cache_dtype="auto",calculate_kv_scales="False",cpu_offload_gb="0",enable_prefix_caching="False",gpu_memory_utilization="0.9",...} 1.0

However, prometheus_client has never supported Info metrics in multiprocessing mode - for unclear reasons. We simply use a Gauge metric set to 1 and multiprocess_mode="mostrecent" instead.

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

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 either: Add ready label to the PR or enable auto-merge.

🚀

@mergify mergify bot added the v1 label Feb 14, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
joachifm Joachim F.
prometheus_client has support for Info metrics which are equivalent to
a Gauge whose value is permanently set to 1, but exposes interesting
key/value pair information via labels. This is used for information
about an instance that does not change - so it only needs to be
observed at startup - and allows comparing across instances in
Prometheus.

We use this concept for the vllm:cache_config_info metric:

```
vllm:cache_config_info{block_size="16",cache_dtype="auto",calculate_kv_scales="False",cpu_offload_gb="0",enable_prefix_caching="False",gpu_memory_utilization="0.9",...} 1.0
```

However, prometheus_client has never supported Info metrics in
multiprocessing mode - for unclear reasons. We simply use a Gauge
metric set to 1 and multiprocess_mode="mostrecent" instead.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
@markmc markmc force-pushed the metrics-v1-cache-config-info branch from e703bac to 53e39cc Compare February 15, 2025 17:08
Copy link
Collaborator

@robertgshaw2-redhat robertgshaw2-redhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one we should consider adding to the deprecation list.

@robertgshaw2-redhat robertgshaw2-redhat added the ready ONLY add when PR is ready to merge/full CI is needed label Feb 20, 2025
@simon-mo simon-mo merged commit 1cd981d into vllm-project:main Feb 22, 2025
52 of 59 checks passed
Akshat-Tripathi pushed a commit to krai/vllm that referenced this pull request Mar 3, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
joachifm Joachim F.
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 v1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants