parameters: (self)
docstring: Saves the checkpoint.
docstring_summary: Saves the checkpoint.
docstring_tokens: Saves the checkpoint .
function: def _save_checkpoint(self):
      """Saves the checkpoint."""
      self._write_checkpoint_manager.save()
      # All workers need to participate in saving a checkpoint to avoid
      # deadlock. They need to write to different paths so that they would not
      # override each other. We make temporary directories for non-chief
      # workers to write to, and clean them up afterward.
      if not multi_worker_util.is_chief(
          cluster_spec=self._cluster_resolver.cluster_spec(),
          task_type=self._cluster_resolver.task_type,
          task_id=self._cluster_resolver.task_id):
        gfile.DeleteRecursively(
            os.path.dirname(self._write_checkpoint_manager.directory))
function_tokens: def _save_checkpoint ( self ) : self . _write_checkpoint_manager . save ( ) # All workers need to participate in saving a checkpoint to avoid # deadlock. They need to write to different paths so that they would not # override each other. We make temporary directories for non-chief # workers to write to, and clean them up afterward. if not multi_worker_util . is_chief ( cluster_spec = self . _cluster_resolver . cluster_spec ( ) , task_type = self . _cluster_resolver . task_type , task_id = self . _cluster_resolver . task_id ) : gfile . DeleteRecursively ( os . path . dirname ( self . _write_checkpoint_manager . directory ) )