From 68f7a0b365f55603a09eb97e852f31ab98f6527e Mon Sep 17 00:00:00 2001 From: Vaibhav Dixit Date: Sat, 5 Oct 2024 00:28:04 -0400 Subject: [PATCH] FiniteDiff can lead to non success criteria --- test/ADtests.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/ADtests.jl b/test/ADtests.jl index dca8ebf34..fbeed6bcc 100644 --- a/test/ADtests.jl +++ b/test/ADtests.jl @@ -48,11 +48,15 @@ end sol = solve(prob, Optim.Newton()) @test 10 * sol.objective < l1 - @test sol.retcode == ReturnCode.Success + if adtype != AutoFiniteDiff() + @test sol.retcode == ReturnCode.Success + end sol = solve(prob, Optim.KrylovTrustRegion()) @test 10 * sol.objective < l1 - @test sol.retcode == ReturnCode.Success + if adtype != AutoFiniteDiff() + @test sol.retcode == ReturnCode.Success + end sol = solve(prob, Optimization.LBFGS(), maxiters = 1000) @test 10 * sol.objective < l1