How to stop in the middle of Learner.fit?

I am trying to create a rough implementation of early stopping using the on_epoch_end callback. How can I tell a Learner to stop training and exit (but still retain everything learned up to that point)?

You have to return True at the end of on_epoch_end.
Note that there is a new callback that does early stopping in callbacks.tracker.

2 Likes