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
688 stars 75 forks source link

OptimizationOptimJL.Optim.BFGS() missing tests for user-supplied derivatives (grad), upper/lower bounds, and the combination #755

Closed sjdaines closed 1 month ago

sjdaines commented 1 month ago

Describe the bug 🐞

Releases v3.25.0, v3.25.1 show regressions for OptimizationOptimJL.Optim.BFGS() when used with upper/lower bounds (v3.25.0, see https://github.com/SciML/Optimization.jl/issues/747) and when used with user-supplied derivative in combination with upper/lower bounds (v3.25.1 https://github.com/SciML/Optimization.jl/issues/754)

Expected behavior

Ideally tests should exist that catch these problems before release...

Edit - apologies, looks like the real problem here is perhaps how the tests are organized, which makes it difficult to maintain and add tests in response to issues and fixes? See https://github.com/SciML/Optimization.jl/pull/758#issuecomment-2122654473

Minimal Reproducible Example 👇

See https://github.com/SciML/Optimization.jl/issues/747#issuecomment-2119192984, https://github.com/SciML/Optimization.jl/issues/754

Additional context