get_callbacksο
- lightning_pose.callbacks.get_callbacks(cfg: DictConfig | ListConfig, early_stopping: bool = False, checkpointing: bool = True, lr_monitor: bool = True, ckpt_every_n_epochs: int | None = None, backbone_unfreeze: bool = True, status_file: Path | None = None) list[source]ο
Build and return the list of training callbacks based on the config.
Note on
AnnealWeight:cfg.callbacks.anneal_weightalways setsattr_name: total_unsupervised_importancein shipped configs, so this callback is the concrete mechanism that annealstotal_unsupervised_importanceover training.AnnealWeightitself is attribute-name-agnostic; this wiring only exists here, in how itβs constructed.- Parameters:
cfg β hydra config containing training and callback parameters.
early_stopping β if True, add an
EarlyStoppingcallback.checkpointing β if True, add a
ModelCheckpointcallback that saves the best model.lr_monitor β if True, add a
LearningRateMonitorcallback.ckpt_every_n_epochs β if not None, also save a checkpoint every this many epochs.
backbone_unfreeze β if True, add the
UnfreezeBackbonecallback.status_file β if not None, add a
JSONTrainingProgressTrackercallback writing to this path.
- Returns:
List of callback objects ready to pass to a
pl.Trainer.