Skip to content
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

Update #711 checking if OptimizationFunction is used for derivative based optimizers #711 #715

Merged
merged 33 commits into from
Apr 7, 2024
Merged
Changes from 2 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
01f4479
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 5, 2024
404f4f3
Merge pull request #1 from ParasPuneetSingh/ParasPuneetSingh-patch-1
ParasPuneetSingh Mar 5, 2024
b2c044d
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 9, 2024
ef4e4a5
Update OptimizationBBO.jl
ParasPuneetSingh Mar 9, 2024
ed73535
Update OptimizationCMAEvolutionStrategy.jl
ParasPuneetSingh Mar 9, 2024
134d7fc
Update OptimizationEvolutionary.jl
ParasPuneetSingh Mar 9, 2024
702e095
Update OptimizationFlux.jl
ParasPuneetSingh Mar 9, 2024
6e2afe3
Update OptimizationGCMAES.jl
ParasPuneetSingh Mar 9, 2024
d1c0111
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 12, 2024
1ba53fb
Update OptimizationNLopt.jl
ParasPuneetSingh Mar 12, 2024
1767142
Update OptimizationOptimisers.jl
ParasPuneetSingh Mar 12, 2024
da5955b
Update OptimizationPRIMA.jl
ParasPuneetSingh Mar 13, 2024
64e16ec
Update OptimizationPolyalgorithms.jl
ParasPuneetSingh Mar 13, 2024
3ae278f
Update OptimizationSpeedMapping.jl
ParasPuneetSingh Mar 13, 2024
4887714
Update OptimizationBBO.jl
ParasPuneetSingh Mar 13, 2024
a1348e3
Update OptimizationNLopt.jl
ParasPuneetSingh Mar 13, 2024
0b6f600
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 13, 2024
6ea74cf
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 13, 2024
5132aea
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 13, 2024
785c218
Update OptimizationMOI.jl
ParasPuneetSingh Mar 13, 2024
8f3e381
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 26, 2024
a5652d7
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 26, 2024
6379379
Update OptimizationOptimJL.jl
ParasPuneetSingh Mar 26, 2024
6fb808b
Update lib/OptimizationOptimJL/src/OptimizationOptimJL.jl
Vaibhavdixit02 Apr 1, 2024
ea6d522
Update OptimizationNLopt.jl
ParasPuneetSingh Apr 3, 2024
73cd120
Update OptimizationOptimJL.jl
ParasPuneetSingh Apr 3, 2024
bae6741
Update OptimizationOptimJL.jl
ParasPuneetSingh Apr 3, 2024
b9854f5
Update OptimizationOptimJL.jl
ParasPuneetSingh Apr 3, 2024
15a5fa0
Update OptimizationPolyalgorithms.jl
ParasPuneetSingh Apr 4, 2024
0857a62
Update Project.toml
ParasPuneetSingh Apr 4, 2024
bb82850
Update Project.toml
ParasPuneetSingh Apr 5, 2024
2d6b7c4
Merge branch 'master' into master
Vaibhavdixit02 Apr 7, 2024
e0610cd
Update Project.toml
Vaibhavdixit02 Apr 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/OptimizationOptimJL/src/OptimizationOptimJL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
SciMLBase.supports_opt_cache_interface(opt::Optim.AbstractOptimizer) = true
SciMLBase.supports_opt_cache_interface(opt::Union{Optim.Fminbox, Optim.SAMIN}) = true
SciMLBase.supports_opt_cache_interface(opt::Optim.ConstrainedOptimizer) = true
SciMLBase.requiresderivative(Optim.AbstractOptimizer) = !(opt isa Optim.ZerothOrderOptimizer)

Check warning on line 17 in lib/OptimizationOptimJL/src/OptimizationOptimJL.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationOptimJL/src/OptimizationOptimJL.jl#L17

Added line #L17 was not covered by tests

function __map_optimizer_args(cache::OptimizationCache,
opt::Union{Optim.AbstractOptimizer, Optim.Fminbox,
Expand Down Expand Up @@ -128,7 +129,8 @@
local x, cur, state

cur, state = iterate(cache.data)

(requiresderivative(Optim.AbstractOptimizer))
error("Use OptimizationFunction to pass the derivatives or automatically generate them with one of the autodiff backends")

Check warning on line 133 in lib/OptimizationOptimJL/src/OptimizationOptimJL.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationOptimJL/src/OptimizationOptimJL.jl#L132-L133

Added lines #L132 - L133 were not covered by tests
!(cache.opt isa Optim.ZerothOrderOptimizer) && cache.f.grad === nothing &&
error("Use OptimizationFunction to pass the derivatives or automatically generate them with one of the autodiff backends")

Expand Down
Loading