Shortcuts

BaseSaveHandler#

class ignite.handlers.checkpoint.BaseSaveHandler[source]#

Base class for save handlers

Methods to override:

Note

In derived class, please, make sure that in distributed configuration overridden methods are called by a single process. Distributed configuration on XLA devices should be treated slightly differently: for saving checkpoint with xm.save() all processes should pass into the function. Otherwise, application gets stuck.

Methods

__call__

Method to save checkpoint with filename.

remove

Method to remove saved checkpoint.

abstract __call__(checkpoint, filename, metadata=None)[source]#

Method to save checkpoint with filename. Additionally, metadata dictionary is provided.

Metadata contains:

  • basename: file prefix (if provided) with checkpoint name, e.g. epoch_checkpoint.

  • score_name: score name if provided, e.g val_acc.

  • priority: checkpoint priority value (higher is better), e.g. 12 or 0.6554435

Parameters
  • checkpoint (Mapping) – checkpoint dictionary to save.

  • filename (str) – filename associated with checkpoint.

  • metadata (Optional[Mapping]) – metadata on checkpoint to save.

Return type

None

abstract remove(filename)[source]#

Method to remove saved checkpoint.

Parameters

filename (str) – filename associated with checkpoint.

Return type

None