Skip to content

Add min_evals parameter to EarlyStopping handler#3661

Open
D0-T wants to merge 2 commits intopytorch:masterfrom
D0-T:feature/early-stopping-min-evals
Open

Add min_evals parameter to EarlyStopping handler#3661
D0-T wants to merge 2 commits intopytorch:masterfrom
D0-T:feature/early-stopping-min-evals

Conversation

@D0-T
Copy link
Copy Markdown

@D0-T D0-T commented Mar 9, 2026

Closes #3411

Description:

Adds a 'min_evals' parameter to 'EarlyStopping' to implement a warmup period.
When specified, the handler tracks the best score but does not enforce patience
until it has been called at least 'min_evals' times.
Changes:

  • 'ignite/handlers/early_stopping.py': new 'min_evals' param, updated 'call', 'reset', 'state_dict', 'load_state_dict'

Check list:

  • New tests are added (if a new feature is added)
  • New doc strings: description and/or example code are in RST format
  • Documentation is updated (if required)

D0-T added 2 commits March 6, 2026 14:22
Introduces a warmup period by adding a new min_evals parameter to
EarlyStopping. When specified, the handler skips patience enforcement
until it has been called at least min_evals times.

Addresses: pytorch#3411
@github-actions github-actions bot added the module: handlers Core Handlers module label Mar 9, 2026
@aaishwarymishra
Copy link
Copy Markdown
Collaborator

@vfdev-5 What do you think? like pr has some problems but should we add helper function like discussed in the issue or add it as parameter so I can ask for refactoring?

@vfdev-5
Copy link
Copy Markdown
Collaborator

vfdev-5 commented Mar 9, 2026

I think let's finish first with #3619
Personally, I would prefer we add a helper function like discussed in the issue instead of a new arg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: handlers Core Handlers module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhancements to EarlyStopping handler

3 participants