Fix hicache log metrics (#20504)

This commit is contained in:
Ke Bao
2026-03-13 16:29:58 +08:00
committed by GitHub
parent f8668d9e78
commit 287dc12b05

View File

@@ -614,7 +614,10 @@ class SchedulerMetricsMixin:
if not self.enable_hierarchical_cache:
return
host_pool = self.tree_cache.token_to_kv_pool_host
host_pool = getattr(self.tree_cache, "token_to_kv_pool_host", None) or getattr(
self.tree_cache, "full_kv_pool_host", None
)
assert host_pool is not None, "Host pool not found"
self.stats.hicache_host_used_tokens = (
host_pool.size - host_pool.available_size()
)