Logging#
REAX supports logging metrics to various backends.
Supported Loggers#
CsvLogger: Logs metrics to a CSV file.TensorBoardLogger: Logs metrics to TensorBoard.WandbLogger: Logs metrics to Weights & Biases.
Configuration#
To use a logger, pass it to the Trainer:
from reax.loggers import TensorBoardLogger
logger = TensorBoardLogger("tb_logs", name="my_model")
trainer = reax.Trainer(logger=logger)
Logging Metrics#
Inside your Module, you can log metrics using self.log():
def training_step(self, batch, batch_idx):
loss = ...
self.log("train_loss", loss)
return loss
Console Logging#
By default, the ProgressBar will display logged metrics in the console
progress bar. You can control this with the prog_bar argument:
self.log("acc", acc, prog_bar=True)