Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 16 additions & 12 deletions src/nvidia_resiliency_ext/fault_tolerance/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,18 +408,22 @@ def _invoke_run_with_any_failed_policy(self, role: str = DEFAULT_ROLE) -> RunRes
rank=self._worker_group.group_rank,
)

logger.info(
"[%s] Detected cluster changes from group_rank=%s "
"(unhealthy_nodes=%s, nodes_waiting=%s); will restart worker group",
role,
group_rank,
unhealthy_count,
num_nodes_waiting,
)

# Note: The node that triggered the change (unhealthy or new) already opened
# the rendezvous, so we don't need to open it again here.
self._restart_workers(self._worker_group)
if self._remaining_restarts > 0:
logger.info(
"[%s] Detected cluster changes from group_rank=%s "
"(unhealthy_nodes=%s, nodes_waiting=%s); will restart worker group",
role,
group_rank,
unhealthy_count,
num_nodes_waiting,
)
self._remaining_restarts -= 1
# Note: The node that triggered the change (unhealthy or new) already opened
# the rendezvous, so we don't need to open it again here.
self._restart_workers(self._worker_group)
else:
self._stop_workers(self._worker_group)
return RunResult(state=WorkerState.FAILED)
else:
raise Exception(f"[{role}] Worker group in {state.name} state")

Expand Down