Using the EarlyStopping callback, Lightning will automatically stop training once a specific metric has stopped improving.