Skip to content

Commit d143152

Browse files
ziruiliugemini-code-assist[bot]NickLucche
authored
[KVConnector] Enable get_block_ids_with_load_errors() in LMCache connector (#27978)
Signed-off-by: Zirui Liu <[email protected]> Signed-off-by: ziruiliu <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Nicolò Lucchesi <[email protected]>
1 parent a4730c1 commit d143152

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

vllm/distributed/kv_transfer/kv_connector/v1/lmcache_connector.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,21 @@ def get_finished(
136136
"""
137137
return self._lmcache_engine.get_finished(finished_req_ids)
138138

139+
def get_block_ids_with_load_errors(self) -> set[int]:
140+
"""
141+
Get the set of block IDs that failed to load.
142+
143+
Returns:
144+
Set of block IDs that encountered load errors.
145+
Empty set if no load errors occurred.
146+
"""
147+
method = getattr(self._lmcache_engine, "get_block_ids_with_load_errors", None)
148+
if callable(method):
149+
return method()
150+
151+
# Fallback for older versions that don't support this method
152+
return set()
153+
139154
# ==============================
140155
# Scheduler-side methods
141156
# ==============================

0 commit comments

Comments
 (0)