Skip to content

Conversation

@aaishwarymishra
Copy link
Contributor

This pull request introduces significant improvements to the EarlyStopping handler in Ignite, adding support for both minimization and maximization modes, as well as absolute and relative thresholds for improvement. It also updates the documentation, validation logic, and expands test coverage to ensure correctness for the new features.

Enhancements to EarlyStopping functionality:

  • Added a new mode parameter to EarlyStopping, allowing users to specify whether to maximize or minimize the score. The logic for improvement now supports both directions. [1] [2] [3]
  • Improved handling of min_delta and min_delta_mode to support both absolute and relative changes, with explicit logic for each mode and direction. [1] [2]
  • Updated validation in the constructor to check for valid values of mode and min_delta_mode. [1] [2]

Documentation updates:

  • Expanded docstrings to clarify the new mode parameter and the behavior of min_delta_mode, including detailed examples for both maximization and minimization. [1] [2]

Testing improvements:

  • Added new unit tests to verify correct behavior for minimization mode, including tests for absolute and relative delta, and cumulative delta scenarios.

Other changes:

  • Updated the Python version requirement in pyproject.toml to allow Python 3.14.…roved score evaluation

Fixes #{issue number}

Description:

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)

part of #3411

@github-actions github-actions bot added the module: handlers Core Handlers module label Feb 7, 2026
@aaishwarymishra aaishwarymishra marked this pull request as ready for review February 7, 2026 19:35
@aaishwarymishra
Copy link
Contributor Author

oh okay I would do that, why the builds are failing though, is it because I changes the python version requirements in project.toml?

@vfdev-5
Copy link
Collaborator

vfdev-5 commented Feb 9, 2026

It's due to unmaintained visdom package, #3526

github-merge-queue bot pushed a commit that referenced this pull request Feb 9, 2026
Thanks @aaishwarymishra for pointing out on python-version update in
#3520
@aaishwarymishra
Copy link
Contributor Author

done

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vfdev-5 vfdev-5 enabled auto-merge February 9, 2026 12:27
@vfdev-5 vfdev-5 added this pull request to the merge queue Feb 9, 2026
Merged via the queue into pytorch:master with commit 148f8c6 Feb 9, 2026
22 of 24 checks passed
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.

2 participants