Skip to content

Commit

Permalink
Merge pull request #3 from ParasPuneetSingh/ParasPuneetSingh-MOO-1
Browse files Browse the repository at this point in the history
Updated loss function in __solve of OptimizationEvolutionary.jl
  • Loading branch information
ParasPuneetSingh authored Jul 8, 2024
2 parents e987377 + 44b4a86 commit 8210956
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/OptimizationEvolutionary/src/OptimizationEvolutionary.jl
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,13 @@ function SciMLBase.__solve(cache::OptimizationCache{
f = cache.f

_loss = function (θ)
x = f(θ, cache.p, cur...)
return first(x)
if isa(f, MultiObjectiveOptimizationFunction)
x = f(θ, cache.p, cur...)
return x
else
x = f(θ, cache.p, cur...)
return first(x)
end
end

opt_args = __map_optimizer_args(cache, cache.opt; callback = _cb, cache.solver_args...,
Expand Down

0 comments on commit 8210956

Please sign in to comment.