xplogger.logger package

Submodules

xplogger.logger.base module

Abstract logger class.

class xplogger.logger.base.Logger(config: Dict[str, Any])[source]

Bases: object

Abstract Logger Class.

abstract write(log: Dict[str, Any])None[source]

Interface to write the log.

Parameters

log (LogType) – Log to write

xplogger.logger.filesystem module

Functions to interface with the filesystem.

class xplogger.logger.filesystem.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to the filesystem.

write(log: Dict[str, Any])None[source]

Write the log to the filesystem.

Parameters

log (LogType) – Log to write

xplogger.logger.filesystem.get_logger_file_path(logger_dir: str, filename: Optional[str], filename_prefix: str, filename_suffix: str)str[source]

Get path to the file (to write logs to).

xplogger.logger.localdb module

Functions to interface with local db (a file).

class xplogger.logger.localdb.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to local db (a file).

write(log: Dict[str, Any])None[source]

Write the log to local db.

Parameters

log (LogType) – Log to write

xplogger.logger.mlflow module

Logger class that writes to mlflow.

class xplogger.logger.mlflow.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to mlflow.

write(log: Dict[str, Any])None[source]

Write the log to mlflow.

Parameters

log (LogType) – Log to write

write_config(config: Dict[str, Any])None[source]

Write the config to mlflow.

Parameters

config (ConfigType) – Config to write

write_metric(metric: Dict[str, Any])None[source]

Write metric to mlflow.

Parameters

metric (MetricType) – Metric to write

xplogger.logger.mongo module

Functions to interface with mongodb.

class xplogger.logger.mongo.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to the mongodb.

write(log: Dict[str, Any])None[source]

Write the log to mongodb.

Parameters

log (LogType) – Log to write

xplogger.logger.tensorboard module

Logger class that writes to tensorboard.

class xplogger.logger.tensorboard.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to tensorboardX.

write(log: Dict[str, Any])None[source]

Write the log to tensorboard.

Parameters

log (LogType) – Log to write

write_config(config: Dict[str, Any])None[source]

Write the config to tensorboard.

Parameters

config (ConfigType) – Config to write

write_metric(metric: Dict[str, Any])None[source]

Write metric to tensorboard.

Parameters

metric (MetricType) – Metric to write

xplogger.logger.wandb module

Logger class that writes to wandb.

class xplogger.logger.wandb.Logger(config: Dict[str, Any])[source]

Bases: xplogger.logger.base.Logger

Logger class that writes to wandb.

write(log: Dict[str, Any])None[source]

Write log to wandb.

Parameters

log (LogType) – Log to write

write_config(config: Dict[str, Any])None[source]

Write config to wandb.

Parameters

config (ConfigType) – Config to write

write_metric(metric: Dict[str, Any])None[source]

Write metric to wandb.

Parameters

metric (MetricType) – Metric to write

Module contents