[P/D] Add a shutdown method to the Connector API (#22699)

Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
This commit is contained in:
Chauncey
2025-09-07 23:07:00 -07:00
committed by GitHub
parent 8c892b1831
commit 61aa4b2901
10 changed files with 52 additions and 12 deletions
+8
View File
@@ -129,6 +129,10 @@ class WorkerBase:
"""Get vocabulary size from model configuration."""
return self.model_config.get_vocab_size()
def shutdown(self) -> None:
"""Clean up resources held by the worker."""
return
class DelegateWorkerBase(WorkerBase):
"""
@@ -519,6 +523,10 @@ class WorkerWrapperBase:
from vllm.utils import init_cached_hf_modules
init_cached_hf_modules()
def shutdown(self) -> None:
if self.worker is not None:
self.worker.shutdown()
def adjust_rank(self, rank_mapping: Dict[int, int]) -> None:
"""
Adjust the rpc_rank based on the given mapping.