From 3113c4e525b99847c6e63a3f3a63a7cb5cd80d25 Mon Sep 17 00:00:00 2001 From: tmigot Date: Tue, 8 Apr 2025 16:23:04 -0400 Subject: [PATCH 1/2] first try --- src/method.jl | 10 +++++----- test/allocs.jl | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/method.jl b/src/method.jl index 213fb07..69db01d 100644 --- a/src/method.jl +++ b/src/method.jl @@ -262,7 +262,7 @@ function SolverCore.reset!(solver::PercivalSolver, model::AbstractNLPModel) end function reinit!(al_nlp::AugLagModel{M, T, V}, model::M, fx::T, μ::T, x::V, y::V) where {M, T, V} - reset!(al_nlp) + NLPModels.reset!(al_nlp) al_nlp.store_Jv .= zero(T) al_nlp.store_Jtv .= zero(T) al_nlp.fx = fx @@ -283,7 +283,7 @@ counter_cost(nlp) = neval_obj(nlp) + 2 * neval_grad(nlp) Specialize `SolverCore.reset!` function to percival's context. """ function reset_subproblem!(solver::PercivalSolver{T, V}, model::AbstractNLPModel{T, V}) where {T, V} - reset!(solver.sub_solver, model) + SolverCore.reset!(solver.sub_solver, model) end function reset_subproblem!( @@ -291,7 +291,7 @@ function reset_subproblem!( model::AugLagModel{M, T, V}, ) where {T, V, Op, M, ST <: TronSolver{T, V}} solver.sub_solver.xc .= model.x - reset!(solver.sub_solver) + SolverCore.reset!(solver.sub_solver) end function SolverCore.solve!( @@ -324,7 +324,7 @@ function SolverCore.solve!( verbose::Integer = 0, kwargs..., ) where {T, V} - reset!(stats) + SolverCore.reset!(stats) @lencheck nlp.meta.nvar x x = solver.x .= x gx = solver.gx @@ -411,7 +411,7 @@ function SolverCore.solve!( model = subproblem_modifier(al_nlp) reset_subproblem!(solver, model) S = solver.sub_stats - reset!(S) + SolverCore.reset!(S) solve!( solver.sub_solver, model, diff --git a/test/allocs.jl b/test/allocs.jl index 5e0f3de..de7adb7 100644 --- a/test/allocs.jl +++ b/test/allocs.jl @@ -64,8 +64,8 @@ if v"1.7" <= VERSION solver = PercivalSolver(nlp) stats = GenericExecutionStats(nlp) SolverCore.solve!(solver, nlp, stats) - reset!(solver) - reset!(nlp) + SolverCore.reset!(solver) + NLPModels.reset!(nlp) al = @wrappedallocs SolverCore.solve!(solver, nlp, stats) @test al == 0 end From b16bc5e61103963aa081414fd7a9ff660aa5e45b Mon Sep 17 00:00:00 2001 From: Tangi Migot Date: Wed, 16 Apr 2025 17:23:09 -0400 Subject: [PATCH 2/2] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b42e27..0afd7a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: arch: x64 allow_failure: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }}