Skip to content

Commit

Permalink
some more iters
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhavdixit02 committed Jan 6, 2024
1 parent 2e6b1f4 commit 325de43
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/OptimizationCMAEvolutionStrategy/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/OptimizationEvolutionary/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/OptimizationFlux/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/OptimizationOptimJL/src/OptimizationOptimJL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Check warning on line 345 in lib/OptimizationOptimJL/src/OptimizationOptimJL.jl

View check run for this annotation

Codecov / codecov/patch

lib/OptimizationOptimJL/src/OptimizationOptimJL.jl#L345

Added line #L345 was not covered by tests
u = decompose_trace(trace).metadata["x"],
objective = x[1],
solver_state = trace)
Expand Down
2 changes: 1 addition & 1 deletion lib/OptimizationOptimisers/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 325de43

Please sign in to comment.