Pass epoch outputs to callback hooks `on_validation_epoch_end` and `on_test_epoch_end`
🚀 Feature
The callback hook on_validation_epoch_end(self, trainer, pl_module) should receive the outputs of the validation epoch, changing its signature to on_validation_epoch_end(self, trainer, pl_module, outputs), same for the hook on_test_epoch_end. This functionality has already been implemented for on_train_epoch_end.
Motivation
I have different models where I want to do the same things with the validation/test outputs after each epoch: write predictions out to a dataframe and create plots based on the outputs. Separating this functionality from my modules by using a callback (instead of polluting all my modules with this code) seems to be the proper way.
This feature request is related to the open issues #4689 and #4369 concerning a bug in on_train_epoch_end.