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
Make updaters call new_epoch
automatically
#4608
Conversation
Please fix the style error. |
Fixed |
jenkins, test this please |
Please check test failure. |
It seems you need to specify class names in the docstrings. |
Fixed the docstring. |
Jenkins CI test (for commit 47bd02e) failed with status FAILURE. |
jenkins, test this please |
Jenkins CI test (for commit 47bd02e) failed with status FAILURE. |
LGTM! |
new_epoch
automatically
Fixed #3044. This PR lets the built-in updaters automatically call
Optimizer.new_epoch()
whenis_new_epoch
is true for the main iterator.This change is incompatible with v4. To aid the incompatibility, I added
use_auto_new_epoch
flag toOptimizer
, which is set by the updaters. When this flag is set,new_epoch()
called outside the updater raises an error so that users can notice duplicated calls ofnew_epoch()
. It means that existing code that uses any updater andnew_epoch
simultaneously will raise an error. This error can be fixed by 1) not callingnew_epoch
outside the updater, or 2) passingauto_new_epoch=False
to the updater.