Skip to content

Commit 2c2cdda

Browse files
committed
fix agentic KV offload validation
1 parent 33dfe13 commit 2c2cdda

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

utils/validate_reusable_sweep_artifacts.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,19 @@ def actual_benchmark_keys(artifacts_dir: Path) -> set[tuple[Any, ...]]:
105105

106106
def agentic_key(row: dict[str, Any]) -> tuple[Any, ...]:
107107
"""Build an agentic identity from one point result."""
108+
if "kv_offloading" in row:
109+
kv_offloading = row.get("kv_offloading") or "none"
110+
offload_key: Any = (
111+
kv_offloading,
112+
(row.get("kv_offload_backend") or "")
113+
if kv_offloading != "none"
114+
else "",
115+
)
116+
else:
117+
offload_key = row.get("offloading", "none")
118+
108119
if as_bool(row.get("is_multinode", False)):
109-
return (
120+
key = (
110121
"multi",
111122
row.get("hw"),
112123
row.get("infmax_model_prefix"),
@@ -124,6 +135,9 @@ def agentic_key(row: dict[str, Any]) -> tuple[Any, ...]:
124135
as_int(row.get("decode_num_workers", 0)),
125136
as_int(row.get("conc")),
126137
)
138+
if "kv_offloading" in row or "offloading" in row:
139+
return (*key, offload_key)
140+
return key
127141
return (
128142
"single",
129143
row.get("hw"),
@@ -136,7 +150,7 @@ def agentic_key(row: dict[str, Any]) -> tuple[Any, ...]:
136150
as_int(row.get("ep", 1)),
137151
as_bool(row.get("dp_attention", False)),
138152
as_int(row.get("conc")),
139-
row.get("offloading", "none"),
153+
offload_key,
140154
)
141155

142156

0 commit comments

Comments
 (0)