ksuit.callbacks.default_callbacks.eta

Classes

EtaCallback

Callback to print the progress and estimated duration until the _periodic_callback will be invoked. Also

Module Contents

class ksuit.callbacks.default_callbacks.eta.EtaCallback(callback_config, **kwargs)

Bases: ksuit.callbacks.base.periodic_callback.PeriodicCallback

Callback to print the progress and estimated duration until the _periodic_callback will be invoked. Also counts up the current epoch/update/samples and provides the average update duration. Only used in “unmanaged” runs, i.e., it is not used when the run was started via SLURM.

Initializes the PeriodicCallback.

Parameters:
  • callback_config (ksuit.schemas.callbacks.callbacks_config.CallBackBaseConfig) – Configuration of the PeriodicCallback. Implements the CallBackBaseConfig schema.

  • trainer – Trainer of the current run, subclass of SgdTrainer.

  • model – Model of the current run.

  • data_container – DataContainer instance that provides access to all datasets.

  • tracker – Tracker instance to log metrics to stdout/disk/online platform.

  • log_writer – LogWriter instance to log metrics.

  • checkpoint_writer – CheckpointWriter instance to save checkpoints.

  • metric_property_provider – MetricPropertyProvider instance to access properties of metrics.

  • name – Name of the callback.

class LoggerWasCalledHandler

Bases: logging.Handler

Handler instances dispatch logging events to specific destinations.

The base handler class. Acts as a placeholder which defines the Handler interface. Handlers can optionally use Formatter instances to format records as desired. By default, no formatter is specified; in this case, the ‘raw’ message as determined by record.message is logged.

Initializes the instance - basically setting the formatter to None and the filter list to empty.

was_called = False
emit(_)

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

total_time = 0.0
time_since_last_log = 0.0
handler
epoch_format = None
update_format = None