cerebras.modelzoo.common.checkpoint_utils.CkptInfo#

class cerebras.modelzoo.common.checkpoint_utils.CkptInfo[source]#

Bases: object

Class to manage checkpoints created within one run.

Initializes CkptInfo.

Parameters

ckpt_dir – directory where checkpoints are to be saved

Methods

update

Save ckpt_info if last checkpoint path changed.

__init__(ckpt_dir: str)[source]#

Initializes CkptInfo.

Parameters

ckpt_dir – directory where checkpoints are to be saved

update(ckpt_path: str, max_store: Optional[int] = None)[source]#

Save ckpt_info if last checkpoint path changed.

Parameters
  • ckpt_path – path to the last checkpoint

  • max_store – maximum number of checkpoints to store