-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Description
📚 Documentation
Hi Lightning team,
The docs encourage that the Callbacks should be "NON-ESSENTIAL logic that is NOT required for your lightning module".
However, in the example of accessing all batch outputs in on_train_epoch_end()
docs, the clearing of the memory is done inside the callback, making it essential to avoid memory build-up.
It would be nice to adapt this example so that memory clean-up does not depend on the Callback.
I would assume it is as easy as moving memory-clearing code to the LightningModule's on_train_epoch_end()
, however, I couldn't find any documentation of what is being called first, the LightningModule's on_train_epoch_end()
or the Callbacks... Maybe I have missed it, but if not, then it would be another improvement to the docs.
Cheers