LocalFileLogger

class LocalFileLogger(experiments_folder: str, config: Optional[Dict[str, Any]] = None, gzip: bool = False)[source]

Bases: etna.loggers.file_logger.BaseFileLogger

Logger for logging files into local folder.

It writes its result into folder like experiments_folder/2021-12-12T12-12-12, where the second part is related to datetime of starting the experiment.

After every start_experiment it creates a new subfolder job_type/group. If some of these two values are None then behaviour is little different and described in start_experiment method.

Create instance of LocalFileLogger.

Parameters
  • experiments_folder (str) – path to folder to create experiment in

  • config (Optional[Dict[str, Any]]) – a dictionary-like object for saving inputs to your job, like hyperparameters for a model or settings for a data preprocessing job

  • gzip (bool) – indicator whether to use compression during saving tables or not

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([job_type, group])

Start experiment within current experiment, it is used for separate different folds during backtest.

to_dict()

Collect all information about etna object in dict.

start_experiment(job_type: Optional[str] = None, group: Optional[str] = None, *args, **kwargs)[source]

Start experiment within current experiment, it is used for separate different folds during backtest.

As a result, within self.experiment_folder subfolder job_type/group is created.

  • If job_type or group isn’t set then only one-level subfolder is created.

  • If none of job_type and group is set then experiment logs files into self.experiment_folder.

Parameters
  • job_type (Optional[str]) – Specify the type of run, which is useful when you’re grouping runs together into larger experiments using group.

  • group (Optional[str]) – Specify a group to organize individual runs into a larger experiment.