neuro_morpho.logging.comet

Comet.ml logger for experiment tracking.

Classes

CometLogger

Logger for Comet.ml.

Module Contents

class neuro_morpho.logging.comet.CometLogger(api_key: str | None = None, experiment_key: str | None = None, project_name: str | None = None, workspace: str | None = None, auto_param_logging: bool = False, auto_metric_logging: bool = False, disabled: bool = False)[source]

Bases: neuro_morpho.logging.base.Logger

Logger for Comet.ml.

This logger sends experiment data to Comet.ml for tracking and visualization.

experiment
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.

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.

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

Log a dictionary of hyperparameters.

Parameters:

metrics (dict) – The dictionary of hyperparameters.

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

Log the code in the given folder.

Parameters:

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