[RL] Release weight-transfer communicators without stopping inference (#61060)
Signed-off-by: aoshen02 <aoshen@inferact.ai> Signed-off-by: fh3 <a@b>
This commit is contained in:
@@ -1482,6 +1482,15 @@ class Worker(WorkerBase):
|
||||
typed_init_info = self.weight_transfer_engine.parse_init_info(init_info)
|
||||
self.weight_transfer_engine.init_transfer_engine(typed_init_info)
|
||||
|
||||
def shutdown_weight_transfer_engine(self) -> None:
|
||||
"""Release a trainer connection without shutting down inference."""
|
||||
if self._weight_update_active:
|
||||
raise RuntimeError(
|
||||
"Cannot release a trainer connection during a weight update"
|
||||
)
|
||||
if self.weight_transfer_engine is not None:
|
||||
self.weight_transfer_engine.shutdown()
|
||||
|
||||
def start_weight_update(self) -> None:
|
||||
"""Start a new weight update session.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user