class_docstr: Training state management class.
  
  This class provides apis for backing up and restoring the training state.
  This allows model and epoch information to be saved periodically and restore
  for fault-tolerance, also known as preemption-recovery purpose.
class_docstr_tok: ["Training","state","management","class",".","This","class","provides","apis","for","backing","up","and","restoring","the","training","state",".","This","allows","model","and","epoch","information","to","be","saved","periodically","and","restore","for","fault-tolerance",",","also","known","as","preemption-recovery","purpose","."]
docstr: Restore the training state from the backed up checkpoint file.
  
  Returns:
    True if the training state is successfully restored. False if the training
    state doesn't need to be restored, or error occurred so it can't.
docstr_tok: ["Restore","the","training","state","from","the","backed","up","checkpoint","file",".","Returns",":","True","if","the","training","state","is","successfully","restored",".","False","if","the","training","state","does","n't","need","to","be","restored",",","or","error","occurred","so","it","ca","n't","."]
code: def restore(self):
      """Restore the training state from the backed up checkpoint file.
  
      Returns:
        True if the training state is successfully restored. False if the training
        state doesn't need to be restored, or error occurred so it can't.
      """
      self.read_checkpoint_manager.restore_or_initialize()
  
file_path: tensorflow-upstream/tensorflow/python/keras/distribute/worker_training_state.py
imports: import os
  from tensorflow.python.checkpoint import checkpoint
  from tensorflow.python.checkpoint import checkpoint_management
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.keras import backend
  from tensorflow.python.keras.distribute import distributed_file_utils
  from tensorflow.python.keras.utils import mode_keys
  from tensorflow.python.lib.io import file_io
  from tensorflow.python.ops import variables
label_desc: Use image node_id 3 for calling the WorkerTrainingState obj's underlying member method code with example usage: obj.restore() without return types