Save a checkpoint to a temporary path; set `self.checkpoint_path` to the path
where it is saved; if called repeatedly, will always overwrite the last checkpoint.
if not self.checkpoint_path:
fh, path = tempfile.mkstemp(".ckpt", "tftreecl-", self.checkpoint_path)
self.checkpoint_path = path
log_info("Saving checkpoint to %s" % self.checkpoint_path)
self.saver.save(self.session, self.checkpoint_path)
After Change
Save a checkpoint to a temporary path; set `self.checkpoint_path` to the path
where it is saved; if called repeatedly, will always overwrite the last checkpoint.
if not self.checkpoint_path:
path = tempfile.mkdtemp(suffix="", prefix="tftreecl-")
self.checkpoint_path = os.path.join(path, "ckpt")
log_info("Saving checkpoint to %s" % self.checkpoint_path)
self.saver.save(self.session, self.checkpoint_path)
def restore_checkpoint(self):