- Algorithm.restore(checkpoint_path: Union[str, ray.air.checkpoint.Checkpoint], checkpoint_node_ip: Optional[str] = None, fallback_to_latest: bool = False)#
Restores training state from a given model checkpoint.
These checkpoints are returned from calls to save().
Subclasses should override
load_checkpoint()instead to restore state. This method restores additional metadata saved with the checkpoint.
checkpoint_pathshould match with the return from
/ray_results/exp/MyTrainable_abc/ checkpoint_00000/checkpoint. Or,
self.logdirshould generally be corresponding to
checkpoint_path, for example,
self.remote_checkpoint_dirin this case, is something like,
checkpoint_path – Path to restore checkpoint from. If this path does not exist on the local node, it will be fetched from external (cloud) storage if available, or restored from a remote node.
checkpoint_node_ip – If given, try to restore checkpoint from this node if it doesn’t exist locally or on cloud storage.
fallback_to_latest – If True, will try to recover the latest available checkpoint if the given
checkpoint_pathcould not be found.