logger#


class LoggerFactory[source]#

Bases: ToStringMixin, ABC

abstract create_logger(log_dir: str, experiment_name: str, run_id: str | None, config_dict: dict | None = None) BaseLogger[source]#

Creates the logger.

Parameters:
  • log_dir – path to the directory in which log data is to be stored

  • experiment_name – the name of the job, which may contain os.path.delimiter

  • run_id – a unique name, which, depending on the logging framework, may be used to identify the logger

  • config_dict – a dictionary with data that is to be logged

Returns:

the logger

abstract get_logger_class() type[BaseLogger][source]#

Returns the class of the logger that is to be created.

class LoggerFactoryDefault(logger_type: Literal['tensorboard', 'wandb', 'pandas'] = 'tensorboard', wand_entity: str | None = None, wandb_project: str | None = None, group: str | None = None, job_type: str | None = None, save_interval: int = 1)[source]#

Bases: LoggerFactory

create_logger(log_dir: str, experiment_name: str, run_id: str | None, config_dict: dict | None = None) BaseLogger[source]#

Creates the logger.

Parameters:
  • log_dir – path to the directory in which log data is to be stored

  • experiment_name – the name of the job, which may contain os.path.delimiter

  • run_id – a unique name, which, depending on the logging framework, may be used to identify the logger

  • config_dict – a dictionary with data that is to be logged

Returns:

the logger

get_logger_class() type[BaseLogger][source]#

Returns the class of the logger that is to be created.