Trainer hooks for before training start and after test/val ends
❓ Questions and Help
What is your question?
I am wondering if there are existing hooks that allow me to do something before training starts and after test ends.
Use case:


Training start: Initialization works like call self.logger.watch(self) - right now I am using prepare_data as a hack since I could not find something like this.


On test end/val end: My research requires me to build some plots with predictions (and ground truth) of the learned model and I need all datapoints to do some aggregated processing so I cannot just use a current batch and I cannot use the epoch_end hooks since I really want to do this as a last step (end of last epoch). I used to do that as a last step in ignite (since then I have moved  to lightning and love it)


EDIT: On a second thought, if I call test after fit has completed, then test_epoch_end() will work since it will be called only once?
EDIT2: Is there a place in the documentation where I can see a comprehensive list of callbacks and hooks and the order in which everything is called? I am a little confused - I see hooks and callbacks and and I feel confused about when to use which, is my ask better suited to be used with callbacks and I should build one myself?