pytorch/ignite

Enhancements to EarlyStopping handler

已關閉

#3,411 建立於 2025年6月4日

 (19 則留言) (0 個反應) (0 位負責人)Python (602 個分叉)batch import
enhancementhelp wantedmodule: handlers

倉庫指標

星標
 (4,313 顆星)
PR 合併指標
 (平均合併 18天 23小時) (30 天內合併 19 個 PR)

描述

🚀 Feature

I would propose several enhancements to the EarlyStopping handler.

  1. Introduce a new parameter, min_delta_mode, mimicking the parameter threshold_mode of ReduceLROnPlateau. If min_delta_mode="abs" (default) everything works as of now, while if min_delta_mode="rel" the score comparison becomes score >= best_score (1 + min_delta).
  2. Introduce a new parameter mode that work's as in ReduceLROnPlateau, allowing to handle validation metrics to be minimized.

Other ideas I'd like to discuss are:

  • Natively implementing min_epochs/min_evals, preventing EarlyStopping from terminating until it has been evaluated at least X times. I know this could be addressed as in #3317 but this solution might be more compact?
  • It would be nice to have the same threshold and threshold_mode nomenclature as ReduceLROnPlateau, but I realize this would probably break older code.
  • I personally find the parameter name cumulative_delta quite counter-intuitive. When I first read about that parameter, I understood it was taking the cumulative sum of the improvements and comparing this cumulative sum to min_delta.

貢獻者指南