[KV Offloading] Remove dummy worker-side stats from OffloadingConnector (#45905)

Signed-off-by: Alex <alex.tech.lab@outlook.com>
Signed-off-by: AlexHuang <jihuihuang@alexai.com>
Co-authored-by: Or Ozeri <oro@il.ibm.com>
This commit is contained in:
AlexHuang
2026-06-18 08:13:28 +03:00
committed by GitHub
co-authored by Or Ozeri
parent b4c80ec0fd
commit 421c1ec448
2 changed files with 0 additions and 21 deletions
@@ -383,22 +383,6 @@ def test_cpu_offloading_metrics() -> None:
total += sample.value
return total
# Stats are drained asynchronously — if the transfer finishes
# after the last engine step for that generate() call, the metrics
# won't appear until a subsequent step. Retry with dummy generates
# to force additional stats drains.
deadline = time.monotonic() + _RESET_CACHE_TIMEOUT
while time.monotonic() < deadline:
store_bytes = _get_counter_value("vllm:kv_offload_store_bytes")
load_bytes = _get_counter_value("vllm:kv_offload_load_bytes")
if store_bytes > 0 and load_bytes > 0:
break
llm.generate(
[TokensPrompt(prompt_token_ids=[0])],
SamplingParams(max_tokens=1),
use_tqdm=False,
)
# New flat counter metrics
store_bytes = _get_counter_value("vllm:kv_offload_store_bytes")
assert store_bytes > 0, f"Expected store_bytes > 0, got {store_bytes}"
@@ -190,11 +190,6 @@ class OffloadingConnector(KVConnectorBase_V1, SupportsHMA):
def get_kv_connector_stats(self) -> KVConnectorStats | None:
if self.connector_scheduler is not None:
return self.connector_scheduler.get_stats()
# TODO(orozery): Remove once PR #43877 lands
if self.connector_worker is not None:
return OffloadingConnectorStats()
return None
@classmethod