pe.logger.csv_print module

class pe.logger.csv_print.CSVPrint(output_folder, path_separator='-', float_format='.8f', flush_iteration_freq=1)[source]

Bases: Logger

The logger that prints the metrics to CSV files.

__init__(output_folder, path_separator='-', float_format='.8f', flush_iteration_freq=1)[source]

Constructor.

Parameters:
  • output_folder (str) – The output folder that will be used to save the CSV files

  • path_separator (str, optional) – The string that will be used to replace ‘’ and ‘/’ in log names, defaults to “-”

  • float_format (str, optional) – The format of the floating point numbers, defaults to “.8f”

  • flush_iteration_freq (int, optional) – The frequency to flush the logs, defaults to 1

_clear_logs()[source]

Clear the logs.

_flush()[source]

Flush the logs.

_get_log_path(iteration, item)[source]

Get the log path.

Parameters:
Returns:

The log path

Return type:

str

_log_float(log_path, iteration, item)[source]

Log a float metric item.

Parameters:
clean_up()[source]

Clean up the logger.

log(iteration, metric_items)[source]

Log the metrics.

Parameters: