-
Notifications
You must be signed in to change notification settings - Fork 86
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
Minimal stopping criteria config #1613
base: develop
Are you sure you want to change the base?
Conversation
} | ||
|
||
if (config.get_tag() == pnode::tag_t::map) { | ||
return parse_minimal_criteria(config, context, td); |
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.
return parse_minimal_criteria(config, context, td); | |
auto updated = config::update_type(td); | |
return parse_minimal_criteria(config, context, updated); |
It is to support no valuetype available outside
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.
I'm not sure what you mean here. I can specify the value type of the residual nom criterion, as you can see in the tests.
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's based on the type_descriptor from the outer loop.
I mean something like
"stop": {
"value_type": "float64",
"residual_norm": ...
}
in case no precision information from outside or want to specify certain precision for stop.
core/config/config_helper.cpp
Outdated
parse_or_get_criteria(const pnode& config, const registry& context, | ||
const type_descriptor& td) | ||
{ | ||
if (config.get_tag() == pnode::tag_t::array) { |
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.
The array can not accept 1 object now. you can use type to distinguish the path and reuse the parse_or_get_factory
7735cc5
to
2629167
Compare
0126f7d
to
829b991
Compare
This PR adds a minimal specification for configuring stopping criteria. The test now contains an example for this configuration. Since the main implementation to configure the criteria is already implemented, this adds only a bit of dispatching.
This is intended to continue the discussion in #1392, while not blocking the release.
Todo: