@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 2dfdfed8a0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 15, 21:00 UTC

[V0][Metrics] Deprecate some KV/prefix cache metrics (#14136)

Signed-off-by: Mark McLoughlin <markmc@redhat.com>

Mark McLoughlin committed Mar 3, 2025 at 18:25 UTC 2dfdfed8a0fe5517f8d4050740c251b1c1d35eeb
1 file changed +25 -5
vllm/engine/metrics.py
+25 -5
@@ -74,31 +74,51 @@ class Metrics:
74 ],
75 multiprocess_mode="livemostrecent",
76 )
77 +
78 + # Deprecated in 0.8 - KV cache offloading is not used in V1
79 + # TODO: in 0.9, only enable if show_hidden_metrics=True
80 self.gauge_scheduler_swapped = self._gauge_cls(
81 name="vllm:num_requests_swapped",
79 - documentation="Number of requests swapped to CPU.",
82 + documentation=(
83 + "Number of requests swapped to CPU. "
84 + "DEPRECATED: KV cache offloading is not used in V1"),
85 labelnames=labelnames,
86 multiprocess_mode="sum")
87 +
88 # KV Cache Usage in %
89 self.gauge_gpu_cache_usage = self._gauge_cls(
90 name="vllm:gpu_cache_usage_perc",
91 documentation="GPU KV-cache usage. 1 means 100 percent usage.",
92 labelnames=labelnames,
93 multiprocess_mode="sum")
94 +
95 + # Deprecated in 0.8 - KV cache offloading is not used in V1
96 + # TODO: in 0.9, only enable if show_hidden_metrics=True
97 self.gauge_cpu_cache_usage = self._gauge_cls(
98 name="vllm:cpu_cache_usage_perc",
90 - documentation="CPU KV-cache usage. 1 means 100 percent usage.",
99 + documentation=(
100 + "CPU KV-cache usage. 1 means 100 percent usage. "
101 + "DEPRECATED: KV cache offloading is not used in V1"),
102 labelnames=labelnames,
103 multiprocess_mode="sum")
93 - # Prefix caching block hit rate
104 +
105 + # Deprecated in 0.8 - KV cache offloading is not used in V1
106 + # TODO: in 0.9, only enable if show_hidden_metrics=True
107 self.gauge_cpu_prefix_cache_hit_rate = self._gauge_cls(
108 name="vllm:cpu_prefix_cache_hit_rate",
96 - documentation="CPU prefix cache block hit rate.",
109 + documentation=(
110 + "CPU prefix cache block hit rate. "
111 + "DEPRECATED: KV cache offloading is not used in V1"),
112 labelnames=labelnames,
113 multiprocess_mode="sum")
114 +
115 + # Deprecated in 0.8 - replaced by queries+hits counters in V1
116 + # TODO: in 0.9, only enable if show_hidden_metrics=True
117 self.gauge_gpu_prefix_cache_hit_rate = self._gauge_cls(
118 name="vllm:gpu_prefix_cache_hit_rate",
101 - documentation="GPU prefix cache block hit rate.",
119 + documentation=("GPU prefix cache block hit rate. "
120 + "DEPRECATED: use vllm:gpu_prefix_cache_queries and "
121 + "vllm:gpu_prefix_cache_queries in V1"),
122 labelnames=labelnames,
123 multiprocess_mode="sum")
124