How to log metrics from callbacks?

I want to know if there is a way to log a custom callback values? I’m not certain where to call from.

class CustomCallback(Callback): 
    def on_validation_epoch_end(self, trainer, lightning_module): 
    diff = lightning_module.train_acc.compute() - lightning_module.val_acc.compute() 
    return diff

In trainer_step I’ll use self.log()

Hey @bvng-pilot

You can log using lightning_module.log() using the lightning module reference you get in the hook.