Process-Level Online Recovery Fails and "There is unsafe data in the input tensor" Is Reported

Symptom

After a fault occurs in a training job, the process-level online recovery (step-level recomputation recovery) function is enabled. After the recovery is complete, the training continues. After the training is recovered, the error "unsafe data" is reported before the first iteration is complete. As a result, the recovery fails.

Figure 1 Recovery failure

Cause Analysis

When a fault occurs, the tensor related to the fault is marked as unsafe data, which is no longer trusted. If the tensor is a global variable, you need to rebuild and repair it. When a tensor marked as unsafe data is accessed during computation, an error message "There is unsafe data in the input tensor" is displayed. In this case, you need to locate the accessed tensor object based on the error stack.

Solution

When the accessed tensor object is located, the impact of the tensor object on the training process needs to be determined first.

In addition, avoid accessing the tensor object before rebuilding or reinitialization. To prevent the repair failure caused by the failure to repair the tensors marked as unsafe data in global variables, you are advised to check the global tensors used in the training framework and ensure that they are traced and correctly repaired by the fault repair framework.

Handling Cases