SciML / Optimization.jl

Mathematical Optimization in Julia. Local, global, gradient-based and derivative-free. Linear, Quadratic, Convex, Mixed-Integer, and Nonlinear Optimization in one simple, fast, and differentiable interface.
https://docs.sciml.ai/Optimization/stable/
MIT License
720 stars 79 forks source link

Store grad/hess in state for Optim.jl #716

Closed sethaxen closed 6 months ago

sethaxen commented 6 months ago

The gradient and hessian when optimizing with Optim.jl were never added to the OptimizationState even when available. This PR adds them whenever available.

Checklist

Additional context

Add any other context about the problem here.

codecov[bot] commented 6 months ago

Codecov Report

Attention: Patch coverage is 75.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 11.96%. Comparing base (d4f90fd) to head (0a417ea). Report is 17 commits behind head on master.

Files Patch % Lines
lib/OptimizationOptimJL/src/OptimizationOptimJL.jl 75.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #716 +/- ## =========================================== - Coverage 40.84% 11.96% -28.88% =========================================== Files 31 21 -10 Lines 2522 1438 -1084 =========================================== - Hits 1030 172 -858 + Misses 1492 1266 -226 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.