[UnifiedRadixTree]: Add KL accuracy CI for UnifiedTree with HiCache (#24346)

This commit is contained in:
Zhangheng
2026-05-04 20:18:10 +08:00
committed by GitHub
parent 84f3b44916
commit 05aed5e1d5
3 changed files with 63 additions and 66 deletions
@@ -1244,12 +1244,6 @@ class UnifiedRadixCache(BasePrefixCache):
self.dec_lock_ref(ancestor_node)
return None
logger.info(
"load_back: kv_tokens=%d, node_id=%d",
kv_tokens,
last_hit_node.id,
)
# Load H→D
aux_xfers = [x for xfers in comp_xfers.values() for x in xfers]
aux_xfers.extend(anchor_kv_shared_indices_xfers)
@@ -1367,14 +1361,9 @@ class UnifiedRadixCache(BasePrefixCache):
req = params.req
if last_node.evicted or params.host_hit_length > 0:
logger.info(
"init_load_back triggered: node_id=%d, host_hit_length=%d",
last_node.id,
params.host_hit_length,
)
loading_values = self.load_back(last_node, mem_quota, req=req)
if loading_values is not None:
logger.info(
logger.debug(
"init_load_back success: loaded %d tokens for node %d",
len(loading_values),
last_node.id,
+7 -2
View File
@@ -118,8 +118,13 @@ def compare_kl_divergence(
# Common request helpers
def _flush_cache(base_url):
requests.post(base_url + "/flush_cache")
def _flush_cache(base_url, timeout_s=30):
response = requests.post(
base_url + "/flush_cache",
params={"timeout": timeout_s},
timeout=timeout_s + 10,
)
response.raise_for_status()
def _generate(