ConsoleLogger

class ConsoleLogger(table: bool = True)[source]

Bases: etna.loggers.base.BaseLogger

Log any events and metrics to stderr output. Uses loguru.

Create instance of ConsoleLogger.

Parameters

table (bool) – Indicator for writing tables to the console

Inherited-members

Methods

finish_experiment(*args, **kwargs)

Finish experiment.

log(msg, **kwargs)

Log any event.

log_backtest_metrics(ts, metrics_df, ...)

Write metrics to logger.

log_backtest_run(metrics, forecast, test)

Backtest metrics from one fold to logger.

set_params(**params)

Return new object instance with modified parameters.

start_experiment(*args, **kwargs)

Start experiment.

to_dict()

Collect all information about etna object in dict.

Attributes

pl_logger

Pytorch lightning loggers.

log(msg: Union[str, Dict[str, Any]], **kwargs)[source]

Log any event.

e.g. “Fitted segment segment_name” to stderr output.

Parameters
  • msg (Union[str, Dict[str, Any]]) – Message or dict to log

  • kwargs – Parameters for changing additional info in log message

log_backtest_metrics(ts: TSDataset, metrics_df: pandas.core.frame.DataFrame, forecast_df: pandas.core.frame.DataFrame, fold_info_df: pandas.core.frame.DataFrame)[source]

Write metrics to logger.

Parameters
  • ts (TSDataset) – TSDataset to with backtest data

  • metrics_df (pandas.core.frame.DataFrame) – Dataframe produced with etna.pipeline.Pipeline._get_backtest_metrics()

  • forecast_df (pandas.core.frame.DataFrame) – Forecast from backtest

  • fold_info_df (pandas.core.frame.DataFrame) – Fold information from backtest

Notes

The result of logging will be different for aggregate_metrics=True and aggregate_metrics=False options in backtest().

property pl_logger

Pytorch lightning loggers.