ksuit.callbacks.checkpoint_callbacks.best_checkpoint ==================================================== .. py:module:: ksuit.callbacks.checkpoint_callbacks.best_checkpoint Classes ------- .. autoapisummary:: ksuit.callbacks.checkpoint_callbacks.best_checkpoint.BestCheckpointCallback Module Contents --------------- .. py:class:: BestCheckpointCallback(callback_config, **kwargs) Bases: :py:obj:`ksuit.callbacks.PeriodicCallback` Callback to save the best model based on a metric. Initializes the BestCheckpointCallback. :param callback_config: The configuration for the callback. Implements the BestMetricCallbackConfig schema. :param \*\*kwargs: additional arguments passed to the parent class. .. py:attribute:: metric_key .. py:attribute:: model_names .. py:attribute:: higher_is_better .. py:attribute:: best_metric_value .. py:attribute:: save_frozen_weights .. py:attribute:: tolerances_is_exceeded .. py:attribute:: tolerance_counter :value: 0 .. py:attribute:: metric_at_exceeded_tolerance :type: dict[float, float] .. py:method:: state_dict() Returns the state of the callback. .. py:method:: load_state_dict(state_dict) Loads the state of the callback into the state_dict. Note that this modifies the input state_dict.