Class responsible for managing singleton instances of the loggers, initialization and finalization
of the loggers, and passing the logged values to the appropriate loggers and their methods.
Returns a full name of the source. If source is a string itself, returns that string.
Otherwise, it returns a string in the format “name-sourcetype” (e.g., “action-metric”).
Logger that saves values in CSV format. It saves the logged values to the CSV file when the experiment is finished.
CsvLogger synchronizes the logged values in time. It means that if the same source is logged twice in a row,
the step number will be incremented for all columns and the logger will move to the next row.
Parameters:
csv_path (str, default="~/rlib-logs-[date]-[time].csv") – Path to the output file.
Logger that presents and saves values as matplotlib plots. Offers smoothing of the curve, scatter plots, and
multiple curves in a single chart (while logging arrays). PlotsLogger is able to synchronize the logged
values in time. This means that if the same source is logged less often than other sources, the step will be
increased accordingly to maintain the appropriate spacing between the values on the x-axis.
Parameters:
plots_dir (str, default="~") – Output directory for the plots.
plots_ext (str, default="svg") – Extension of the saved plots.
plots_smoothing (float, default=0.6) – Weight of the exponential moving average (EMA/EWMA) [1] used for smoothing. \(\alpha \in [0, 1)\).
plots_scatter (bool, default=False) – Set to True if you want to generate a scatter plot instead of a line plot.
plots_smoothing parameter does not apply to the scatter plots.
plots_sync_steps (bool, default=False) – Set to True if you want to synchronize the logged values in time.
Shows the generated plots and saves them to the output directory with the specified extension
(the names of the files follow the pattern "rlib-plot-[source]-[date]-[time].[ext]").
Logger that saves values in TensorBoard [2] format. Offers a possibility to log to Comet [3].
TensorboardLogger synchronizes the logged values in time. This means that if the same source
is logged less often than other sources, the step will be increased accordingly to maintain the
appropriate spacing between the values on the x-axis.
Parameters:
tb_log_dir (str, optional) – Path to the output directory. If None, the default directory is used.
tb_comet_config (dict, optional) – Configuration for the Comet logger. If None, the logger is disabled.
tb_sync_steps (bool, default=False) – Set to True if you want to synchronize the logged values in time.
Logger that saves values to Weights & Biases [4] platform. WeightsAndBiasesLogger synchronizes
the logged values in time. This means that if the same source is logged less often than other sources,
the step will be increased accordingly to maintain the appropriate spacing between the values on the x-axis.
Note: to use this logger, you need to log into W&B before running the script. The necessary steps are
described in the official documentation [4].
Parameters:
wandb_sync_steps (bool, default=False) – Set to True if you want to synchronize the logged values in time.