Shortcuts

Loggers

ConsoleLogger

class catalyst.loggers.console.ConsoleLogger(log_hparams: bool = False, log_loader_metrics: bool = True, log_epoch_metrics: bool = True)[source]

Bases: catalyst.core.logger.ILogger

Console logger for parameters and metrics. Used by default during all runs.

Parameters
  • log_hparams – boolean flag to print all hparams to the console (default: False)

  • log_loader_metrics – boolean flag to print loader metrics to the console (default: True)

  • log_epoch_metrics – boolean flag to print epoch metrics to the console (default: True)

CSVLogger

class catalyst.loggers.csv.CSVLogger(logdir: str, use_logdir_postfix: bool = False)[source]

Bases: catalyst.core.logger.ILogger

@TODO: docs.

TensorboardLogger

class catalyst.loggers.tensorboard.TensorboardLogger(logdir: str, use_logdir_postfix: bool = False)[source]

Bases: catalyst.core.logger.ILogger

Tensorboard logger for parameters, metrics, images and other artifacts.

Parameters
  • logdir – path to logdir for tensorboard

  • use_logdir_postfix – boolean flag to use extra tensorboard prefix in the logdir

MLflowLogger

class catalyst.loggers.mlflow.MLflowLogger(experiment: str, run: Optional[str] = None, tracking_uri: Optional[str] = None, registry_uri: Optional[str] = None)[source]

Bases: catalyst.core.logger.ILogger

Mlflow logger for parameters, metrics, images and other artifacts.

Mlflow documentation: https://mlflow.org/docs/latest/index.html.

Parameters
  • experiment – Name of the experiment in MLflow to log to.

  • run – Name of the run in Mlflow to log to.

  • tracking_uri – URI of tracking server against which to log run information related.

  • registry_uri – Address of local or remote model registry server.

Notebook API example:

from catalyst import dl

class CustomSupervisedRunner(dl.IRunner):
    def get_engine(self) -> dl.IEngine:
        return dl.DeviceEngine("cpu")

    def get_loggers(self):
        return {
            "console": dl.ConsoleLogger(),
            "mlflow": dl.MLflowLogger(experiment="test_exp", run="test_run")
        }

runner = CustomSupervisedRunner().run()
model = runner.model

Config API example:

loggers:
    mlflow:
        _target_: MLflowLogger
        experiment: test_exp
        run: test_run
...
__init__(experiment: str, run: Optional[str] = None, tracking_uri: Optional[str] = None, registry_uri: Optional[str] = None) → None[source]