-
Notifications
You must be signed in to change notification settings - Fork 23
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
Cannot get NLPBlock
via MOI.get
#289
Comments
Indeed a getter was missing. This should be fixed by: #290 |
I think this particular case can be fixed by #290
This is not supported. |
Closing as fixed by #290 |
I'll add: it's mainly not supported because we now have no control over how the solver implements derivatives. It's a property of the solver, not of JuMP or MOI. As examples, querying the hessian Lagrangian timer doesn't make sense for AmplNLWriter or BARON. |
Yes, that makes sense. I assume all nonlinear models will have an |
Not necessarily, and not one that they can get or set. |
I'd like to profile function/derivative callbacks during a Knitro solve, and per the example in
rosetta-opf
, it seems the "standard" way to do this should be throughMOI.get(unsafe_backend(model), MOI.NLPBlock())
. However, this gives me an error that theNLPBlock()
attribute is not supported. For example, the following script raises aGetAttributeNotAllowed
error.I can get the evaluator via
model.moi_backend.optimizer.model.nlp_data.evaluator
, but this (a) is a lot to remember and (b) seems to not work when using Knitro in direct mode.I'm not sure if what I'm attempting above is the correct way to do this, but I would like to be able to query NLP callback times in a solver-agnostic way.
The text was updated successfully, but these errors were encountered: