LogConfig

LogConfig#

class stable_ssl.config.LogConfig(folder: str | None = None, run: str | None = None, load_from: str = 'ckpt', level: int = 20, checkpoint_frequency: int = 10, save_final_model: bool = False, final_model_name: str = 'final_model', eval_only: bool = False, eval_epoch_freq: int = 1, wandb_entity: str | None = None, wandb_project: str | None = None)[source]#

Bases: object

Configuration for the ‘log’ parameters.

Parameters:
  • folder (str, optional) – Path to the folder where logs and checkpoints will be saved. Default is the current directory + random hash folder.

  • load_from (str, optional) – Path to a checkpoint from which to load the model, optimizer, and scheduler. Default is “ckpt”.

  • level (int, optional) – Logging level (e.g., logging.INFO). Default is logging.INFO.

  • checkpoint_frequency (int, optional) – Frequency of saving checkpoints (in terms of epochs). Default is 10.

  • save_final_model (bool, optional) – Whether to save the final trained model. Default is False.

  • final_model_name (str, optional) – Name for the final saved model. Default is “final_model”.

  • eval_only (bool, optional) – Whether to only evaluate the model without training. Default is False.

  • eval_epoch_freq (int, optional) – Frequency of evaluation (in terms of epochs). Default is 1.

  • wandb_entity (str, optional) – Name of the (Weights & Biases) entity. Default is None.

  • wandb_project (str, optional) – Name of the (Weights & Biases) project. Default is None.

property dump_path#

Return the full path where logs and checkpoints are stored.

This path includes the base folder and the run identifier.