NumPy allowed · plain Python earns 10 bonus points
Implement patience-based early stopping, the real, standard mechanism training loops use to halt before overfitting.
Implement should_stop_early(val_losses, patience, min_delta=0.0). Track the best (minimum) loss seen so far as you walk val_losses in order; a loss counts as an improvement only if it's < best - min_delta. Count consecutive epochs WITHOUT improvement. Return True if that counter ever reaches patience, else False after processing the whole list.
should_stop_early(val_losses: list[float], patience: int, min_delta: float = 0.0) -> bool