Skip to content

Commit aee273c

Browse files
committed
Make reset_cache optionally return None for unimplemented connectors
Signed-off-by: tovam <tovam@pliops.com>
1 parent a00cb91 commit aee273c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,11 +492,11 @@ def build_prom_metrics(
492492
"""
493493
return None
494494

495-
def reset_cache(self) -> bool:
495+
def reset_cache(self) -> bool | None:
496496
"""
497497
Reset the connector's internal cache.
498498
499499
Returns:
500500
bool: True if the cache was successfully reset, False otherwise.
501501
"""
502-
return False
502+
return None

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,4 +440,4 @@ def build_prom_metrics(
440440
)
441441

442442
def reset_cache(self) -> bool:
443-
return all(connector.reset_cache() for connector in self._connectors)
443+
return all(c.reset_cache() is not False for c in self._connectors)

vllm/v1/core/sched/scheduler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def reset_connector_cache(self) -> bool:
12501250
if self.connector is None:
12511251
logger.warning("reset_connector called but no KV connector configured.")
12521252
return False
1253-
return self.connector.reset_cache()
1253+
return self.connector.reset_cache() is not False
12541254

12551255
def make_stats(
12561256
self,

0 commit comments

Comments
 (0)