cerebras.modelzoo.common.checkpoint_utils.CkptInfo#

class cerebras.modelzoo.common.checkpoint_utils.CkptInfo(ckpt_dir)[source]#

Bases: object

Class to manage checkpoints created within one run.

Initializes CkptInfo.

Parameters

ckpt_dir (str) – directory where checkpoints are to be saved

Methods

update

Save ckpt_info if last checkpoint path changed.

update(ckpt_path, max_store=None)[source]#

Save ckpt_info if last checkpoint path changed.

Parameters
  • ckpt_path (str) – path to the last checkpoint

  • max_store (Optional[int]) – maximum number of checkpoints to store