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

Explicit warning when AD backend not specified correctly for automatic box-constraint handling with Optim #741

Closed Vaibhavdixit02 closed 1 month ago

Vaibhavdixit02 commented 1 month ago

Checklist

Additional context

Fixes #713 #558 Add any other context about the problem here.

ChrisRackauckas commented 1 month ago

Instead of a warning should it error?

Vaibhavdixit02 commented 1 month ago

I guess that might lead to fewer issues, so makes sense. It would be a breaking change though

sjdaines commented 1 month ago

This errors with ERROR: UndefVarError:NoADnot defined in Optimization.jl v3.25.0

See issue https://github.com/SciML/Optimization.jl/issues/747