-
-
Notifications
You must be signed in to change notification settings - Fork 655
Fix max iters issue and add tests #3439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
f62141f
to
6f9c0f4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a fix for max_iters handling in the Engine state dictionary and adds comprehensive test coverage. The changes extend the Engine class to properly support max_iters
as an alternative to max_epochs
for controlling training duration.
Key changes include:
- Enhanced Engine state dict validation to support both
max_epochs
andmax_iters
termination modes - Updated serialization logic to include appropriate termination parameters based on the training configuration
- Extended test coverage for various max_iters scenarios including resuming, state loading, and edge cases
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
tests/ignite/engine/test_max_iters_fix.py |
Comprehensive test suite for max_iters functionality covering state dict operations, resuming, and validation |
tests/ignite/engine/test_engine_state_dict.py |
Updated existing tests to account for additional state dict keys |
tests/ignite/conftest.py |
Added defensive checks for pytest configuration options |
tests/ignite/base/test_mixins_update.py |
Tests for updated Serializable mixin validation logic |
ignite/engine/engine.py |
Core Engine implementation with max_iters support and improved state management |
ignite/base/mixins.py |
Enhanced Serializable base class with grouped optional key validation |
Various workflow and metric files | Minor fixes and updates |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ignite/metrics/vision/object_detection_average_precision_recall.py
Outdated
Show resolved
Hide resolved
075f57c
to
eba390f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR @goanpeca !
I made the first pass and left comments essentially to split this PR into multiple ones and explain certain changes.
I'll check in more depth the max_iters related changes a bit later whether it works as expected.
Anyway, great job!
ignite/metrics/vision/object_detection_average_precision_recall.py
Outdated
Show resolved
Hide resolved
fc1fcb5
to
cfd0d13
Compare
cfd0d13
to
697ba81
Compare
697ba81
to
243afad
Compare
Fixes #1521
Depends on: