[Metrics][KV Offload] Add vllm:kv_offload_config_info - generic info metrics for offloading the offloading connector (#56867)
Signed-off-by: Amir Friedman <Amir.Friedman1@ibm.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Or Ozeri <oro@il.ibm.com>
This commit is contained in:
co-authored by
Claude Opus 5
Or Ozeri
parent
3a5a6b11a3
commit
775fefa804
@@ -24,6 +24,7 @@ from vllm.v1.kv_offload.cpu.common import (
|
||||
from vllm.v1.kv_offload.cpu.manager import CPUOffloadingManager
|
||||
from vllm.v1.kv_offload.cpu.policies.arc import ARCCachePolicy
|
||||
from vllm.v1.kv_offload.cpu.policies.lru import LRUCachePolicy
|
||||
from vllm.v1.kv_offload.cpu.spec import CPUOffloadingSpec
|
||||
|
||||
|
||||
def make_req_context(
|
||||
@@ -238,6 +239,15 @@ def test_filter_reused_manager_reports_stores_skipped_counter():
|
||||
assert stats.reduce()[CPUOffloadingMetrics.STORES_SKIPPED] == 0
|
||||
|
||||
|
||||
def test_cpu_manager_fills_the_config_info_keys_of_the_spec():
|
||||
"""A name the declaration misses becomes a dropped label at runtime."""
|
||||
manager = make_cpu_manager(num_chunks=4)
|
||||
|
||||
(info,) = manager.config_info()
|
||||
assert tuple(info) == CPUOffloadingSpec.config_info_keys({})
|
||||
assert info["cpu_num_chunks"] == 4
|
||||
|
||||
|
||||
def test_cpu_manager_reports_cache_usage_gauge():
|
||||
def check_usage_stats(manager: CPUOffloadingManager, value: float):
|
||||
stats = manager.get_stats()
|
||||
|
||||
Reference in New Issue
Block a user