Skip to content

Commit

Permalink
🤖 Format .jl files (#271)
Browse files Browse the repository at this point in the history
Co-authored-by: d-monnet <[email protected]>
  • Loading branch information
github-actions[bot] and d-monnet authored Apr 13, 2024
1 parent 866492f commit 9278021
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/fomo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function SolverCore.solve!(
obj_mem = solver.o
M = length(obj_mem)
mem_ind = 0
obj_mem[mem_ind+1] = stats.objective
obj_mem[mem_ind + 1] = stats.objective
max_obj_mem = stats.objective

grad!(nlp, x, ∇fk)
Expand Down Expand Up @@ -392,8 +392,8 @@ function SolverCore.solve!(
momentum .= ∇fk .* (oneT - β) .+ momentum .* β
end
set_objective!(stats, fck)
mem_ind = (mem_ind+1) % M
obj_mem[mem_ind+1] = stats.objective
mem_ind = (mem_ind + 1) % M
obj_mem[mem_ind + 1] = stats.objective
max_obj_mem = maximum(obj_mem)

grad!(nlp, x, ∇fk)
Expand Down
5 changes: 4 additions & 1 deletion test/test_solvers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ function tests()
@testset "$name : nonmonotone configuration" for (name, solver) in [
("R2", (nlp; kwargs...) -> R2(nlp, M = 2; kwargs...)),
("fomo_r2", (nlp; kwargs...) -> fomo(nlp, M = 2; kwargs...)),
("fomo_tr", (nlp; kwargs...) -> fomo(nlp, M = 2, step_backend = JSOSolvers.tr_step(); kwargs...)),
(
"fomo_tr",
(nlp; kwargs...) -> fomo(nlp, M = 2, step_backend = JSOSolvers.tr_step(); kwargs...),
),
]
unconstrained_nlp(solver)
multiprecision_nlp(solver, :unc)
Expand Down

0 comments on commit 9278021

Please sign in to comment.