My team is using OrdinaryDiffEq.jl and several other numerical packages, where we are testing a variety of solver results to be within some tolerance. On multiple occasions, some of these tests have begun to fail after updating the major or minor version of a dependency. Recently, I believe this happened due to some currently unknown dependency’s patch release, failing our tests without us changing anything. So far, the new results are not too far from what we had previously expected. However, we are concerned about the longevity of these tests and accumulated numerical drift.
julia> @test isapprox(result, 90.5; atol = 0.4)
Test Failed at REPL[10]:1
Expression: isapprox(result, 90.5; atol = 0.4)
Evaluated: isapprox(90.91580618639445, 90.5; atol = 0.4)
What are the best practices for such testing such results and avoiding failures with solver updates and numerical drift? We anticipate the following two suggestions, but would appreciate additional insight:
- Using a more appropriate solver that provides better stability for our use case
- Using validation pipelines to improve our confidence when updating broken tests