_Logger¶
- class _Logger[source]¶
Bases:
etna.loggers.base.BaseLogger
Composite for loggers.
Create instance for composite of loggers.
- Inherited-members
Methods
add
(logger)Add new logger.
disable
()Context manager for local logging disabling.
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.
remove
(idx)Remove logger by identifier.
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
Pytorch lightning loggers.
- add(logger: etna.loggers.base.BaseLogger) int [source]¶
Add new logger.
- Parameters
logger (etna.loggers.base.BaseLogger) – logger to be added
- Returns
result – identifier of added logger
- Return type
int
- log(msg: Union[str, Dict[str, Any]], **kwargs)[source]¶
Log any event.
- Parameters
msg (Union[str, Dict[str, Any]]) –
- 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
- log_backtest_run(metrics: pandas.core.frame.DataFrame, forecast: pandas.core.frame.DataFrame, test: pandas.core.frame.DataFrame)[source]¶
Backtest metrics from one fold to logger.
- Parameters
metrics (pandas.core.frame.DataFrame) – Dataframe with metrics from backtest fold
forecast (pandas.core.frame.DataFrame) – Dataframe with forecast
test (pandas.core.frame.DataFrame) – Dataframe with ground truth
- remove(idx: int)[source]¶
Remove logger by identifier.
- Parameters
idx (int) – identifier of added logger
- start_experiment(*args, **kwargs)[source]¶
Start experiment.
Complete logger initialization or reinitialize it before the next experiment with the same name.
- property pl_loggers¶
Pytorch lightning loggers.