[Metrics] Add group-aware KV cache capacity to vllm:cache_config_info (#42206)
The startup log already reports the correct group-aware KV cache capacity for hybrid models, but Prometheus did not expose matching info in 'vllm:cache_config_info`. This PR adds kv_cache_size_tokens and kv_cache_max_concurrency. Signed-off-by: Ethan Feng <ethan.fengch@gmail.com>
This commit is contained in:
@@ -289,6 +289,17 @@ async def test_metrics_exist(
|
||||
continue
|
||||
assert metric in response.text
|
||||
|
||||
cache_config_samples = [
|
||||
sample
|
||||
for family in text_string_to_metric_families(response.text)
|
||||
if family.name == "vllm:cache_config_info"
|
||||
for sample in family.samples
|
||||
]
|
||||
assert cache_config_samples
|
||||
for sample in cache_config_samples:
|
||||
assert sample.labels.get("kv_cache_size_tokens") not in (None, "None", "")
|
||||
assert sample.labels.get("kv_cache_max_concurrency") not in (None, "None", "")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_abort_metrics_reset(
|
||||
|
||||
Reference in New Issue
Block a user