LoggerConfig#
- class stable_ssl.config.LoggerConfig(level: int = 20, metric: dict = <factory>, monitor: dict = <factory>, save_final_model: str | bool = False, eval_every_epoch: int = 1, log_every_step: int = 1, checkpoint_frequency: int | None = None, checkpoint_model_only: bool = True, dump_path: ~pathlib.Path = <factory>, wandb: bool | dict | None = None)[source]#
Bases:
object
Configuration for logging and checkpointing during training or evaluation.
- Parameters:
level (int, optional) – The logging level. Determines the threshold for what gets logged. Default is 20.
metric (dict, optional) – A dictionary to store and log various metrics. Default is an empty dict.
monitor (dict, optional) – A dictionary to store and log various monitoring statistics. Default is an empty dict
save_final_model (str or bool, optional) – Specifies whether to save the final trained model. If a name is provided, the final model will be saved with that name. Default is False.
eval_every_epoch (int, optional) – The frequency (in epochs) at which the model will be evaluated. For example, if set to 1, evaluation occurs every epoch. Default is 1.
log_every_step (int, optional) – The frequency (in training steps) at which to log intermediate metrics. For example, if set to 1, logs occur every step. Default is 1.
checkpoint_frequency (int, optional) – The frequency (in epochs) at which model checkpoints are saved. For example, if set to 10, a checkpoint is saved every 10 epochs. Default is None.
checkpoint_model_only (bool, optional) – Whether to save only the model weights (True) or save additional training state (False) during checkpointing. Default is True.
dump_path (pathlib.Path, optional) – The path where output is dumped. Defaults to Hydra’s runtime output directory.
wandb (bool or dict or None, optional) – Configuration for Weights & Biases logging. If True, it will be converted to an empty dictionary and default keys will be filled in if rank == 0. Default is None. See
stable_ssl.config.WandbConfig
for the full list of parameters and their defaults.