Skip to content

Commit 81b54c0

Browse files
Merge pull request #1 from ValentinKaisermayer/ValentinKaisermayer-patch-1
Update nomad.jl
2 parents 97484f4 + 53da499 commit 81b54c0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/solve/nomad.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ function __solve(prob::OptimizationProblem, opt::NOMADOpt;
5353
end
5454

5555
function bb(x)
56-
bb_outputs = [_loss(x)]
57-
success = true
56+
l = _loss(x)
57+
success = !isnan(l) && !isinf(l)
5858
count_eval = true
59-
return (success, count_eval, bb_outputs)
59+
return (success, count_eval, [l])
6060
end
6161

6262
if !isnothing(prob.lcons) | !isnothing(prob.ucons)

0 commit comments

Comments
 (0)