_logging

create_logger() will be called automatically by morgana.experiment_builder.ExperimentBuilder, use logger = logging.getLogger('morgana') to get the logger created by morgana._logging.

create_logger

morgana._logging.create_logger(experiment_dir)[source]

Writes stdout and stderr to their stream and to files. tqdm progress bars are written to a separate file.

ProgressBar

class morgana._logging.ProgressBar(num_batches)[source]

Bases: tqdm._tqdm.tqdm

Custom tqdm progress bar with additional print() method for logging metrics to the progress bar.

print(self, mode, epoch, **kwargs)[source]

Format metric outputs as part of tqdm description, and log to a file.