Skip to content

Commit 1611b20

Browse files
Loosen flaky test tolerances for BPINN and NNODE
- BPINN: bump abs2 tolerance from 0.05 to 0.1 for inverse solve test - NNODE: bump parameter estimation atol from 0.03 to 0.05 - NNODE: increase complex numbers maxiters 5000→10000, loosen rtol 0.1→0.2 Co-Authored-By: Chris Rackauckas <[email protected]>
1 parent c58ca2a commit 1611b20

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/BPINN_tests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ end
496496
@test mean(abs, u[2, :] .- pmean(sol_pestim1.ensemblesol[2])) >
497497
mean(abs, u[2, :] .- pmean(sol_pestim2.ensemblesol[2]))
498498

499-
@test mean(abs2, u[1, :] .- pmean(sol_pestim2.ensemblesol[1])) < 5.0e-2
499+
@test mean(abs2, u[1, :] .- pmean(sol_pestim2.ensemblesol[1])) < 1.0e-1
500500
@test mean(abs2, u[2, :] .- pmean(sol_pestim2.ensemblesol[2])) < 2.0e-2
501501

502502
@test abs(sol_pestim2.estimated_de_params[1] - p[1]) < 0.05p[1]

test/NNODE_tests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ end
290290
@test !isapprox(sol_old_points, sol_points; atol = 10)
291291

292292
@test sol_new.k.u.p true_p atol = 1.0e-2
293-
@test sol_new_points sol_points atol = 3.0e-2
293+
@test sol_new_points sol_points atol = 5.0e-2
294294
end
295295

296296
@testitem "ODE Complex Numbers" tags = [:nnode] begin
@@ -334,8 +334,8 @@ end
334334

335335
@testset "$(nameof(typeof(strategy)))" for strategy in strategies
336336
alg = NNODE(chain, Adam(0.01); strategy)
337-
sol = solve(problem, alg; verbose = false, maxiters = 5000, saveat = 0.01)
338-
@test sol.u ground_truth.u rtol = 1.0e-1
337+
sol = solve(problem, alg; verbose = false, maxiters = 10000, saveat = 0.01)
338+
@test sol.u ground_truth.u rtol = 2.0e-1
339339
end
340340

341341
alg = NNODE(chain, Adam(0.01); strategy = QuadratureTraining())

0 commit comments

Comments
 (0)