class oneflow.train.CheckPoint

Create a CheckPoint object to manage checkpoint manually.

init() → None

Initialize models by default initializer of op or Job.

load(path: str) → None

load a checkpoint from path and initialize models.


path – A string of path to load checkpoint.

save(path: str) → None

save a checkpoint to path.


path – A string of path to save checkpoint.

class oneflow.train.SimpleCheckPointManager(root_path: str, prefix: str = 'snapshot_')

SimpleCheckPointManager is a simple automatic checkpoint manager.

  • root_path – root path of snapshot

  • prefix – prefix of snapshot

initialize_or_restore() → None
latest_checkpoint() → Optional[str]
list_checkpoints() → List[str]
save() → None