diff --git a/lib/OptimizationCMAEvolutionStrategy/test/runtests.jl b/lib/OptimizationCMAEvolutionStrategy/test/runtests.jl index 525772a87..8ce044e76 100644 --- a/lib/OptimizationCMAEvolutionStrategy/test/runtests.jl +++ b/lib/OptimizationCMAEvolutionStrategy/test/runtests.jl @@ -12,7 +12,7 @@ using Test @test 10 * sol.objective < l1 function cb(state, args...) - if state.iteration % 10 == 0 + if state.iter % 10 == 0 println(state.u) end return false diff --git a/lib/OptimizationEvolutionary/test/runtests.jl b/lib/OptimizationEvolutionary/test/runtests.jl index e7cd3a97b..72b9c19ab 100644 --- a/lib/OptimizationEvolutionary/test/runtests.jl +++ b/lib/OptimizationEvolutionary/test/runtests.jl @@ -36,7 +36,7 @@ Random.seed!(1234) @test sol.objective < l1 function cb(state, args...) - if state.iteration % 10 == 0 + if state.iter % 10 == 0 println(state.u) end return false diff --git a/lib/OptimizationFlux/test/runtests.jl b/lib/OptimizationFlux/test/runtests.jl index 3ca49a562..a78a592c7 100644 --- a/lib/OptimizationFlux/test/runtests.jl +++ b/lib/OptimizationFlux/test/runtests.jl @@ -36,7 +36,7 @@ using Test end function cb(state, args...) - if state.iteration % 10 == 0 + if state.iter % 10 == 0 println(state.u) end return false diff --git a/lib/OptimizationOptimJL/src/OptimizationOptimJL.jl b/lib/OptimizationOptimJL/src/OptimizationOptimJL.jl index 1354fd83b..909e03f4d 100644 --- a/lib/OptimizationOptimJL/src/OptimizationOptimJL.jl +++ b/lib/OptimizationOptimJL/src/OptimizationOptimJL.jl @@ -342,7 +342,7 @@ function SciMLBase.__solve(cache::OptimizationCache{ cur, state = iterate(cache.data) function _cb(trace) - opt_state = Optimization.OptimizationState(iteration = trace.iteration, + opt_state = Optimization.OptimizationState(iter = trace.iteration, u = decompose_trace(trace).metadata["x"], objective = x[1], solver_state = trace) diff --git a/lib/OptimizationOptimisers/test/runtests.jl b/lib/OptimizationOptimisers/test/runtests.jl index bb91c07d5..d16036108 100644 --- a/lib/OptimizationOptimisers/test/runtests.jl +++ b/lib/OptimizationOptimisers/test/runtests.jl @@ -61,7 +61,7 @@ using Zygote prob = OptimizationProblem(optprob, x0, _p) function callback(state, l) - Optimisers.adjust!(state.solver_state, 0.1 / state.iteration) + Optimisers.adjust!(state.original, 0.1 / state.iter) return false end sol = solve(prob,