-
Notifications
You must be signed in to change notification settings - Fork 62
Feat/jh/add callback to scipy interface #291
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?
Feat/jh/add callback to scipy interface #291
Conversation
Thanks for working on this. We'll need to keep the |
Thanks, have you got any ideas for keeping the One idea for backwards compatibility is to:
But it's not particularly elegant. The issue is |
Can Problem be an internal attribute/variable? (instead of subclassing)? |
I see that the scipy code creates a Problem without subclassing Problem, is it that the call backs require a subclass of Problem? Maybe making a second IpoptWrapper class based on the subclass would avoid the backwards incompatibilities. |
I've created a new Interested to hear your thoughts. |
@moorepants - what do you think? |
I think this is fine. |
Can you merge in master and lets see if the tests run? |
I merged master and pushed. |
This error occurs |
|
Description
Implements callbacks in
scipy_interface
wrapper ofcyipopt.Problem
, addressing the Issue raised in #290Callbacks should be defined as a callable
callback(xk)
, wherexk
is the current parameter vector, consistent with: https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.minimize.html.Development Notes
IpoptProblemWrapper
to subclasscyipopt.Problem
self.get_current_iterate()
inintermediate
to pass the current candidatexk
to the callback