-
Notifications
You must be signed in to change notification settings - Fork 31
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
Implement the new interface for objective functions and derivatives #512
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
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.
Very nice PR, this is a big leap towards the new release 🎉
I only have a few clarifying questions. Once these are discussed, I will approve.
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.
Why can we not use the .internal_value(solver_type)
strategy here?
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.
We are not simply evaluating a decorated version of the user provided fun
but internal_criterion_and_derivative
with the task criterion
. So we don't get a SpecificFunctionValue
object here. But I could get rid of the manual aggregation in a different way, by pretending we are using internal_criterion_and_derivative
for a scalar optimizer.
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.
Still couldn't delete _aggregate_func_output_to_value
but should be possible when we have the new internal algorithm interface (which will have better result objects).
@@ -0,0 +1,276 @@ | |||
{ |
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.
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.
Currently yes but I created an issue to remove this limitation.
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.
Looks good, only one comment about a comment.
The changes for the objective function are described here
The changes for derivatives are described here
The jax integration is postponed to a later PR as it does not entail any breaking changes or deprecations.