neuro_morpho.logging.base

Base logger class for experiment logging.

Classes

Logger

Base logger class to define the interface for experiment logging.

Module Contents

class neuro_morpho.logging.base.Logger[source]

Base logger class to define the interface for experiment logging.

abstract log_scalar(name: str, value: float, step: int, train: bool) None[source]

Log a scalar value.

Parameters:
  • name (str) – The name of the scalar.

  • value (float) – The value of the scalar.

  • step (int) – The current step.

  • train (bool) – Whether this is a training or testing metric.

abstract log_triplet(in_img: numpy.ndarray, lbl_img: numpy.ndarray, out_img: numpy.ndarray, name: str, step: int, train: bool) None[source]

Log an image triplet (input, label, output).

Parameters:
  • in_img (np.ndarray) – The input image.

  • lbl_img (np.ndarray) – The label image.

  • out_img (np.ndarray) – The output image.

  • name (str) – The name of the triplet.

  • step (int) – The current step.

  • train (bool) – Whether this is a training or testing metric.

abstract log_parameters(metrics: dict[str, str | float | int]) None[source]

Log a dictionary of hyperparameters.

Parameters:

metrics (dict) – The dictionary of hyperparameters.

abstract log_code(folder: str | pathlib.Path) None[source]

Log the code in the given folder.

Parameters:

folder (str | Path) – The folder containing the code to log.