Optimization.jl icon indicating copy to clipboard operation
Optimization.jl copied to clipboard

MOI Constraint jacobian-vector fixes

Open aml5600 opened this issue 1 year ago • 1 comments

Checklist

  • [ ] Appropriate tests were added
  • [x] Any code changes were done in a way that does not break public API
  • [ ] All documentation related to code changes were updated
  • [x] The new code follows the contributor guidelines, in particular the SciML Style Guide and COLPRAC.
  • [ ] Any new documentation only uses public API

Additional context

It seems that the methods MOI.eval_constraint_jacobian_transpose_product and MOI.eval_constraint_jacobian_product were incorrectly both evaluating the products and erroring when the evaluator possessed cons_vjp or cons_jvp functions.

Add any other context about the problem here.

aml5600 avatar Oct 21 '24 13:10 aml5600

FYI @baggepinnen

aml5600 avatar Oct 21 '24 13:10 aml5600

Can you add a test which catches this?

ChrisRackauckas avatar Oct 23 '24 14:10 ChrisRackauckas

@aml5600 can you add the test, happy to merge it right away once that's added

Vaibhavdixit02 avatar Oct 26 '24 03:10 Vaibhavdixit02

@Vaibhavdixit02 sorry for the delay, please let me know if the tests are sufficient. They failed before, passed after the changes.

aml5600 avatar Oct 29 '24 19:10 aml5600