Adopted from https://keras.io/callbacks/#earlystopping
This will create a new commit in order to revert the existing changes.