noether.core.callbacks.online.best_metric

Classes

BestMetricCallback

A callback that keeps track of the best metric value over a training run. For example, track the test loss of

Module Contents

class noether.core.callbacks.online.best_metric.BestMetricCallback(callback_config, **kwargs)

Bases: noether.core.callbacks.periodic.PeriodicCallback

A callback that keeps track of the best metric value over a training run. For example, track the test loss of the epoch with the best validation loss to simulate early stopping.

Initializes the BestMetricCallback

Parameters:
  • callback_config (noether.core.schemas.callbacks.BestMetricCallbackConfig) – The configuration for the callback. Implements the BestMetricCallbackConfig schema.

  • metric_property_provider – The metric property provider to determine whether higher values are better.

  • **kwargs – additional keyword arguments provided to the parent class.

source_metric_key
target_metric_keys
optional_target_metric_keys
higher_is_better
best_metric_value
previous_log_values: dict[str, Any]