Skip to content

Commit

Permalink
Merge pull request #102 from SciML/optjlintegration
Browse files Browse the repository at this point in the history
kwargs in MOO instantiate_function
  • Loading branch information
Vaibhavdixit02 authored Sep 11, 2024
2 parents 2faa135 + 88feae4 commit b2cbc1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "OptimizationBase"
uuid = "bca83a33-5cc9-4baa-983d-23429ab6bcbb"
authors = ["Vaibhav Dixit <vaibhavyashdixit@gmail.com> and contributors"]
version = "2.0.1"
version = "2.0.2"

[deps]
ADTypes = "47edcb42-4c32-4615-8424-f2b9edc5f35b"
Expand Down
4 changes: 2 additions & 2 deletions src/function.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ documentation of the `AbstractADType` types.
"""
function OptimizationBase.instantiate_function(
f::MultiObjectiveOptimizationFunction, x, ::SciMLBase.NoAD,
p, num_cons = 0)
p, num_cons = 0; kwargs...)
jac = f.jac === nothing ? nothing : (J, x, args...) -> f.jac(J, x, p, args...)
hess = f.hess === nothing ? nothing :
[(H, x, args...) -> h(H, x, p, args...) for h in f.hess]
Expand Down Expand Up @@ -79,7 +79,7 @@ end

function OptimizationBase.instantiate_function(
f::MultiObjectiveOptimizationFunction, cache::ReInitCache, ::SciMLBase.NoAD,
num_cons = 0)
num_cons = 0; kwargs...)
jac = f.jac === nothing ? nothing : (J, x, args...) -> f.jac(J, x, cache.p, args...)
hess = f.hess === nothing ? nothing :
[(H, x, args...) -> h(H, x, cache.p, args...) for h in f.hess]
Expand Down

0 comments on commit b2cbc1a

Please sign in to comment.