qumphy.callbacks.base_logging module

File: qumphy/models/lightning_callbacks.py Project: 22HLT01 QUMPHY Contact: oskar.pfeffer@ptb.de Gitlab: https://gitlab.com/qumphy Description: Pytorch lightning callbacks.

class qumphy.callbacks.base_logging.BaseLoggingCallback(*args: Any, **kwargs: Any)[source]

Bases: Callback

This is a base class for logging callbacks. Predictions and targets of each epoch for each stage are stored in dictionaries in self.predictions and self.targets as self.predictions[stage] and self.targets[stage], where stage is “train”, “val” or “test”. This allows to write new logging callbacks on top of this class, by overriding the log_epoch_end method.

log_epoch_end(trainer, pl_module, stage)[source]

Override this method to log the metrics at the end of the epoch.

log_loss(trainer, pl_module, stage)[source]
on_test_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]
on_test_epoch_end(trainer, pl_module)[source]
on_test_epoch_start(trainer, pl_module)[source]
on_train_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]
on_train_epoch_end(trainer, pl_module)[source]
on_train_epoch_start(trainer, pl_module)[source]
on_validation_batch_end(trainer, pl_module, outputs, batch, batch_idx)[source]
on_validation_epoch_end(trainer, pl_module)[source]
on_validation_epoch_start(trainer, pl_module)[source]