-
Notifications
You must be signed in to change notification settings - Fork 100
Add minimum iteration stopping criterion wrapper #1951
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: simpler_stop_interface
Are you sure you want to change the base?
Conversation
pratikvn
left a comment
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.
Some mising documentation, but otherwise LGTM!
In addition to ensuring minimum iterations when the initial residual is small, it also probably helps in performance when residual (norm) computations dont need to be performed for the first min number of iterations.
| deferred_factory_parameter<Iteration::Factory> max_iters(size_type count); | ||
|
|
||
|
|
||
| deferred_factory_parameter<CriterionFactory> min_iters( |
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.
Some documentation would be needed here, so that users know how to use this wrapper.
| deferred_factory_parameter<Iteration::Factory> max_iters(size_type count); | ||
|
|
||
|
|
||
| deferred_factory_parameter<CriterionFactory> min_iters( |
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.
Any idea how this can be realized in the file config? From the user side this:
criteria:
max_iters: 100
relative_residual_norm: 1e-6
min_iters: 10should be pretty clear, i.e. the first two only activate once min_iters is hit, even though the list of criteria is usually an OR list.
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.
It looks good from the first sight. but feel weird trying explaining it in consistent way
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.
require_iters sounds stronger but it does not fit the class name
f33c0d0 to
89fe7e0
Compare
yhmtsai
left a comment
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.
LGTM. but need to add the corresponding config setup
| * @param count the number of iterations after which to start checking the | ||
| * inner criterion |
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.
| * @param count the number of iterations after which to start checking the | |
| * inner criterion | |
| * @param count the number of iterations after which to start checking the | |
| * inner criterion |
nit
| * stopping criterion behaves like the inner criterion. | ||
| * @return a deferred_factory_parameter that can be passed to the |
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.
| * stopping criterion behaves like the inner criterion. | |
| * @return a deferred_factory_parameter that can be passed to the | |
| * stopping criterion behaves like the inner criterion. | |
| * | |
| * @return a deferred_factory_parameter that can be passed to the |
nit
| deferred_factory_parameter<Iteration::Factory> max_iters(size_type count); | ||
|
|
||
|
|
||
| deferred_factory_parameter<CriterionFactory> min_iters( |
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.
require_iters sounds stronger but it does not fit the class name
|
I think the config setup should ideally happen in a subsequent PR, as I'm not that familiar with it, and don't have much time to continue working on this |
Closes #1879