noether.core.initializers.checkpoint

Classes

CheckpointInitializer

Base class to initialize models from checkpoints of previous runs. Should not be used directly, but inherited by other initializers such as PreviousRunInitializer or ResumeInitializer.

Module Contents

class noether.core.initializers.checkpoint.CheckpointInitializer(initializer_config, **kwargs)

Bases: noether.core.initializers.base.InitializerBase

Base class to initialize models from checkpoints of previous runs. Should not be used directly, but inherited by other initializers such as PreviousRunInitializer or ResumeInitializer.

Parameters:
checkpoint_tag: str | noether.core.utils.training.training_iteration.TrainingIteration
run_id
model_name
load_optim
model_info
pop_ckpt_kwargs_keys
stage_name
init_run_path_provider
init_optimizer(model)

Initialize the optimizer for the model if it is derived from Model.

If model is a CompositeModel, nothing happens. This is expected as CompositeModels can be arbitrarily nested and do not have an optimizer. Instead, a CompositeModel calls init_optim with all its submodels which can be of type Model or a nested CompositeModel.

Parameters:

model (noether.core.models.ModelBase) – a model to initialize the optimizer for. Assumes the model has an attribute optim.

Return type:

None