fancy-twilight-30247
11/21/2025, 10:12 AM@task(
task_config=task_config,
cache=False,
container_image=container_image,
pod_template=pod_template,
timeout=timeout,
retries=max_retries,
)
def flyte_training_main_task():
...
with the task_config being (note that we don't really need the elastic part of things - we just need to launch a multi-node pytorch task):
task_config = Elastic(
nnodes=num_nodes,
nproc_per_node=8,
)
Now imagine that a rank in the distributed training has an error of some sort - is there a way for us to configure our task so that the whole task/workflow is terminated (including all the pods corresponding to it) as soon as a single rank errors? Currently it seems like it requires all the ranks to exit/error until the task/workflow is terminated, which we often don't want (because other ranks might be stuck until NCCL timeout or might be stuck for other reasons). I've tried raising special exception types like SignalException or ChildFailedError , but it seems like it always waits until all the ranks exit. One hacky workaround I could think of is to manually terminate the workflow, but that also does not seem ideal.
Thanks!!freezing-airport-6809
freezing-airport-6809
tall-lock-23197
max_restarts=0 in the Elastic config?
task_config = Elastic(
nnodes=num_nodes,
nproc_per_node=8,
max_restarts=0,
)
this ensures that the job won’t restart if any rank fails. also you can try lowering the NCCL timeout so that the failure is detected more quickly and the job reaches a failed state faster.fancy-twilight-30247
11/24/2025, 8:36 AMtall-lock-23197
fancy-twilight-30247
11/24/2025, 8:56 AMtall-lock-23197
freezing-airport-6809
fancy-twilight-30247
11/26/2025, 6:50 AMfreezing-airport-6809