Skip to content

Commit 7f2f357

Browse files
fix failures
1 parent 43abb68 commit 7f2f357

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/OptimizationOptimisers/src/OptimizationOptimisers.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ function SciMLBase.__solve(cache::OptimizationCache{
7474
cache.progress && ProgressLogging.@logprogress msg i/maxiters
7575

7676
if cache.solver_args.save_best
77-
if first(x)[1] < first(min_err) #found a better solution
77+
if first(x)[1] < first(min_err)[1] #found a better solution
7878
min_opt = opt
79-
min_err = x[1]
79+
min_err = x
8080
min_θ = copy(θ)
8181
end
8282
if i == maxiters #Last iteration, revert to best.
@@ -93,7 +93,7 @@ function SciMLBase.__solve(cache::OptimizationCache{
9393

9494
t1 = time()
9595

96-
SciMLBase.build_solution(cache, cache.opt, θ, x[1], solve_time = t1 - t0)
96+
SciMLBase.build_solution(cache, cache.opt, θ, first(x)[1], solve_time = t1 - t0)
9797
# here should be build_solution to create the output message
9898
end
9999

test/diffeqfluxtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function loss_neuralode(p)
8787
end
8888

8989
iter = 0
90-
callback = function (p, l, pred)
90+
callback = function (p, l, pred, args...)
9191
global iter
9292
iter += 1
9393

0 commit comments

Comments
 (0)