Unverified Commit 906a8c15 authored by Mark McLoughlin's avatar Mark McLoughlin Committed by GitHub
Browse files

[Core][Metrics] Remove unused `SchedulerStats.encoder_cache_usage` (#39693)


Signed-off-by: default avatarMark McLoughlin <markmc@redhat.com>
parent 4f4f8eaa
......@@ -1961,7 +1961,6 @@ class Scheduler(SchedulerInterface):
num_waiting_reqs=len(self.waiting),
num_skipped_waiting_reqs=len(self.skipped_waiting),
kv_cache_usage=self.kv_cache_manager.usage,
encoder_cache_usage=self._get_encoder_cache_usage(),
prefix_cache_stats=prefix_cache_stats,
connector_prefix_cache_stats=connector_prefix_cache_stats,
kv_cache_eviction_events=eviction_events,
......@@ -1971,14 +1970,6 @@ class Scheduler(SchedulerInterface):
perf_stats=perf_stats,
)
def _get_encoder_cache_usage(self) -> float:
"""Get encoder cache usage as a fraction (0.0 to 1.0)."""
ecm = self.encoder_cache_manager
if ecm.cache_size == 0:
return 0.0
used_slots = ecm.cache_size - ecm.num_free_slots
return used_slots / ecm.cache_size
def make_spec_decoding_stats(
self,
spec_decoding_stats: SpecDecodingStats | None,
......
......@@ -181,7 +181,6 @@ class SchedulerStats:
current_wave: int = 0
kv_cache_usage: float = 0.0
encoder_cache_usage: float = 0.0
prefix_cache_stats: PrefixCacheStats = field(default_factory=PrefixCacheStats)
connector_prefix_cache_stats: PrefixCacheStats | None = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment