Understanding Automatic Fault Tolerance
Understanding Fault Tolerance
Training fault tolerance consists of the following capabilities. Different capabilities apply to different tasks and have different handling objectives.
Fault Tolerance Policy and Task Hang Detection are linked: closing Fault Tolerance Policy also closes Task Hang Detection; enabling Task Hang Detection also enables Fault Tolerance Policy. Exit Checkpoint Notification is an independent capability and does not belong to the three fault tolerance modes below.
Select a Fault Tolerance Mode
After understanding each capability, choose the basic mode or combined mode based on the task type, training duration, and the faults to be handled.
RayJob uses the basic mode and does not apply PyTorch-specific configurations.
Understanding Recovery Mechanisms and Capability Boundaries
After a qualifying fault occurs, the platform typically processes it through the following workflow:- Detect faults: Monitor exceptions such as process exits, GPU or hardware errors, and communication hangs, and use logs and error messages to help determine the fault type. After relevant capabilities are enabled, the platform may also perform health checks before training officially begins.
- Select a recovery action: Based on the fault type and current configuration, restart the process in place, resubmit the job, avoid suspected faulty nodes, or trigger diagnostics.
- Continue training: If the training program has saved a checkpoint, the new process or job can continue training from the checkpoint.
Preparing a checkpoint
Whether training progress can be resumed depends on whether the training program correctly saves and loads checkpoints. Before configuring automatic fault tolerance, complete the following preparations:
The checkpoint save frequency should balance storage overhead against rerun costs. Saving only Model weights is generally suitable only for initialization or fine-tuning and may not support fully resuming training.
Configure Automatic Fault Tolerance
When creating a Training job, configure automatic fault tolerance in Advanced Options.1. Configure the task retry budget
Enable Auto Failover and set Maximum Task Restart Attempts. This parameter controls the number of times a task is automatically resubmitted after failure; it is counted separately from in-place process restarts.
When configured through the API, a task retry budget of
0 means that the task-level rerun process is not triggered; a negative value does not indicate unlimited retries.
2. Configure Advanced PyTorch Capabilities as Needed
For PyTorchJob, you can continue to configure Fault Tolerance Policy and Job Hang Detection.
The page currently indicates that hang detection starts 30 minutes after the task is launched. The above value describes the current configuration and does not mean that different clusters and future versions will always use the same default value.
Integrate checkpoint exit notifications
Exit checkpoint notifications and automatic fault tolerance are independent. To notify the training program to save its state before the job exits, you must integrate the program interface and enable the corresponding configuration when creating a PyTorchJob.- Implement
/v1/preempt/notifyin the training program to receive checkpoint save notifications. - Implement
/v1/preempt/statusto return the save result. - On the PyTorchJob creation page, enable Exit ckpt Notification and configure the program listening port. The page currently defaults to
9000, with a valid range of9000to9999. - Use a test job to verify notification receipt, save result reporting, and recovery logic.
600 seconds. Preemption, manual stopping, or deletion may therefore be delayed; you can check the training program’s save logs to determine the progress.
View and Verify Recovery Results
1. View Fault Tolerance Records
If automatic fault tolerance is enabled for a task, or the task status shows a fault-tolerance-related substatus, you can open the Fault Tolerance Detail tab to view the recovery process.- Click the task name to open the training task details page.
- Open the Fault Tolerance Detail tab.
- View the retry chain, fault description, and retry task status.
2. Determine the Recovery Action
First confirm which type of recovery action the platform performed, then determine the next step.
If a fault type is displayed in Fault Tolerance Detail, use the following table to understand the classification result. The fault type is derived by matching logs and error messages to help explain recovery records; it does not represent a confirmed root cause.
For further troubleshooting, see Troubleshoot Training Issues. To identify potentially faulty nodes in multi-node training, use Bisect Diagnose.
3. Verify Training Progress
The platform restarting a process or resubmitting a task does not mean that training progress has been restored. Open the latest attempt and continue to verify:- The task has acquired resources, and the associated instances are ready.
- The logs show that the training program loaded the expected checkpoint.
- Training steps, loss, and business metrics can continue progressing seamlessly before and after recovery.
- New checkpoints and output files are written successfully, with no abnormal duplicate output or data processing.
FAQ
Why was no new task created after auto fault tolerance was enabled?
Why was no new task created after auto fault tolerance was enabled?
First, check Fault Tolerance Detail to confirm whether the platform performed an in-place restart, whether the Maximum Task Restart Count was reached, and whether recovery was stopped due to manual termination or the fast-failure policy. An in-place restart does not create a new task record.
The task is running but training has stalled. Will auto fault tolerance always handle it?
The task is running but training has stalled. Will auto fault tolerance always handle it?
Not necessarily. Hang detection applies to PyTorch GPU tasks and relies on the detection and recovery components in the current cluster. Low GPU utilization alone cannot be used to determine a hang. Please assess it together with training steps, logs, stack traces, monitoring data, and normally time-consuming phases.
Why is a resubmitted task still queued?
Why is a resubmitted task still queued?
The new attempt still needs to acquire resources again. Check the associated task’s Event and verify the resource quota, resource pool availability, node avoidance policy, and scheduling constraints. After a fault-tolerance action avoids suspected faulty nodes, the range of available nodes may be reduced.
Why does every recovery start from step 0?
Why does every recovery start from step 0?
Check the recovery command, checkpoint mount path, file integrity, and read/write permissions. The platform can relaunch the task, but the training program must actively load the checkpoint and resume from the correct training step.
Should automatic retries continue when the same error occurs repeatedly?
Should automatic retries continue when the same error occurs repeatedly?
If the task encounters an OOM error, path error, or dependency failure at the same step every time, first correct the batch size, resource configuration, data path, image, or program issue. Increasing the number of retries usually cannot resolve deterministic errors.
Why does the task restart too frequently?
Why does the task restart too frequently?
Compare the fault categories and training phases in Fault Tolerance Detail, and check whether the Hang detection window covers normally long-running phases such as model loading, data preparation, and evaluation. A window that is too short may increase the risk of false positives.
Why does the number of fault-tolerance actions differ from the number of tasks?
Why does the number of fault-tolerance actions differ from the number of tasks?
Task-level resubmissions and in-place process restarts are counted separately, and diagnostic processes may also generate associated records. In Fault Tolerance Detail, distinguish between task reruns, in-place restarts, and diagnostic actions. Do not estimate the number of fault-tolerance actions solely based on the number of tasks in the task list.

