keras/src/callbacks/early_stopping.py/EarlyStopping/on_train_begin
class EarlyStopping:    def on_train_begin(self, logs=None):
        # Allow instances to be re-used
        self.wait = 0
        self.stopped_epoch = 0
        self.best_weights = None
        self.best_epoch = 0