[BugFix] Ensure appropriate guards in destructors (#25284)

Signed-off-by: Nick Hill <nhill@redhat.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Nick Hill
2025-09-19 18:06:34 -07:00
committed by GitHub
parent 8945b001db
commit a25ade5d47
4 changed files with 8 additions and 9 deletions

View File

@@ -683,7 +683,8 @@ class Worker(WorkerBase):
tensorizer_config=tensorizer_config, )
def shutdown(self) -> None:
self.model_runner.ensure_kv_transfer_shutdown()
if runner := getattr(self, "model_runner", None):
runner.ensure_kv_transfer_shutdown()
def init_worker_distributed_environment(