[UCMConnector]Add has_connector_metadata (#6172)
### What this PR does / why we need it?
ucm_connector add has `has_connector_metadata` interface to adapt to the
latest KV connector in vLLM.
### Does this PR introduce _any_ user-facing change?
this PR doesn't introduce _any_ user-facing change.
### How was this patch tested?
- vLLM version: v0.14.0
- vLLM main:
d68209402d
Signed-off-by: UnifiedCacheManager <unifiedcachem@163.com>
This commit is contained in:
committed by
GitHub
parent
717d299ae5
commit
a2f022f9b6
@@ -43,6 +43,14 @@ class UCMConnectorV1(KVConnectorBase_V1):
|
|||||||
# ==============================
|
# ==============================
|
||||||
# Worker-side methods
|
# Worker-side methods
|
||||||
# ==============================
|
# ==============================
|
||||||
|
def has_connector_metadata(self) -> bool:
|
||||||
|
"""Check whether the connector metadata is currently set.
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
bool: True if connector metadata exists, False otherwise.
|
||||||
|
"""
|
||||||
|
return self._ucm_engine.has_connector_metadata()
|
||||||
|
|
||||||
def register_kv_caches(self, kv_caches: dict[str, torch.Tensor]) -> None:
|
def register_kv_caches(self, kv_caches: dict[str, torch.Tensor]) -> None:
|
||||||
"""
|
"""
|
||||||
Initialize with the KV caches. Useful for pre-registering the
|
Initialize with the KV caches. Useful for pre-registering the
|
||||||
|
|||||||
Reference in New Issue
Block a user