snorkel.classification.CheckpointerConfig

class snorkel.classification.CheckpointerConfig[source]

Bases: tuple

Manager for checkpointing model.

Parameters
  • checkpoint_dir – The path to a directory where checkpoints will be saved The Trainer will set this to the log directory if it is None

  • checkpoint_factor – Check for a best model every this many evaluations. For example, if evaluation_freq is 0.5 epochs and checkpoint_factor is 2, then checkpointing will be attempted every 1 epochs.

  • checkpoint_metric – The metric to checkpoint on, of the form “task/dataset/split/metric:mode” where mode is “min” or “max”.

  • checkpoint_task_metrics – Additional metrics to save best models for. Note that the best model according to checkpoint_metric will be the one that is loaded after training and used for early stopping.

  • checkpoint_runway – No checkpointing will occur for the first this many checkpoint_units

  • checkpoint_clear – If True, clear all checkpoints besides the best so far.

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__

Initialize self.

count(value)

index(value, [start, [stop]])

Raises ValueError if the value is not present.

Attributes

checkpoint_clear

Alias for field number 5

checkpoint_dir

Alias for field number 0

checkpoint_factor

Alias for field number 1

checkpoint_metric

Alias for field number 2

checkpoint_runway

Alias for field number 4

checkpoint_task_metrics

Alias for field number 3

property checkpoint_clear[source]

Alias for field number 5

property checkpoint_dir[source]

Alias for field number 0

property checkpoint_factor[source]

Alias for field number 1

property checkpoint_metric[source]

Alias for field number 2

property checkpoint_runway[source]

Alias for field number 4

property checkpoint_task_metrics[source]

Alias for field number 3

count(value) → integer -- return number of occurrences of value[source]
index(value[, start[, stop]]) → integer -- return first index of value.[source]

Raises ValueError if the value is not present.