[KVConnector] Keep KVTransferParams as a dict (#18033)
This commit is contained in:
@@ -12,8 +12,7 @@ from vllm.distributed.kv_events import EventPublisherFactory, KVEventBatch
|
||||
from vllm.distributed.kv_transfer.kv_connector.factory import (
|
||||
KVConnectorFactory)
|
||||
from vllm.distributed.kv_transfer.kv_connector.v1 import (KVConnectorBase_V1,
|
||||
KVConnectorRole,
|
||||
KVTransferParams)
|
||||
KVConnectorRole)
|
||||
from vllm.logger import init_logger
|
||||
from vllm.multimodal import MULTIMODAL_REGISTRY, MultiModalRegistry
|
||||
from vllm.v1.core.encoder_cache_manager import (EncoderCacheManager,
|
||||
@@ -931,8 +930,13 @@ class Scheduler(SchedulerInterface):
|
||||
return self.connector
|
||||
|
||||
def _connector_finished(
|
||||
self, request: Request) -> tuple[bool, Optional[KVTransferParams]]:
|
||||
"""Invoke the KV connector request_finished() method if applicable."""
|
||||
self, request: Request) -> tuple[bool, Optional[dict[str, Any]]]:
|
||||
"""
|
||||
Invoke the KV connector request_finished() method if applicable.
|
||||
|
||||
Returns optional kv transfer parameters to be included with the
|
||||
request outputs.
|
||||
"""
|
||||
if self.connector is None:
|
||||
return False, None
|
||||
block_ids = self.kv_cache_manager.get_block_ids(request.request_id)
|
||||
|
||||
Reference in New Issue
Block a user