looser numeric tolerance for TestUtils.test_interface#455
Conversation
willtebbutt
left a comment
There was a problem hiding this comment.
I'm happy for this to be merged, subject to resolving my comment, CI passing, and a patch bump being made.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: willtebbutt <wct23@cam.ac.uk>
Codecov Report
@@ Coverage Diff @@
## master #455 +/- ##
=======================================
Coverage 93.18% 93.18%
=======================================
Files 52 52
Lines 1261 1261
=======================================
Hits 1175 1175
Misses 86 86
Continue to review full report at Codecov.
|
|
Looks like this hasn't resolved the test issue 😞 should we just bump the default rtol then ? |
|
Yeah that's what I expected unfortunately. According to the logs in the other PR for the failing tests |
src/TestUtils.jl
Outdated
|
|
||
| const __ATOL = 1e-9 | ||
| const __RTOL = 1e-9 | ||
| const __ATOL = sqrt(eps(Float64)) |
There was a problem hiding this comment.
Is this change required? I would assume changing rtol to the default value for atol = 0 (i.e., sqrt(eps(T))) is sufficient. atol should only be needed when checking approximate equality involving an exact zero which I assume doesn't happen and I guess is fine with lower tolerances such as 1e-9.
There was a problem hiding this comment.
🤷 maybe not? I didn't think too much about it; we didn't carefully assess the tolerances to check whether atol=1e-9 is neeeded, or 1e-10 is enough... and sqrt(eps(Float64)) is ~2e-8 so not much of a change and it seemed nicely symmetric. Anyways, happy to change it back if (atol, rtol) = (1e-9, 2e-8) is better. What do you think @willtebbutt ?
There was a problem hiding this comment.
To my mind the point of the tests is to pick up on really substantial issues with a kernel implementation (i.e. substantial asymmetry in the kernel matrix, large negative eigenvalues), rather than to test that the numerics, as that presumably has to be a kernel-specific thing. Consequently, I'm happy with the looser atol that @st-- proposes.
@st-- is also correct that 1e-9 was chosen for no particular reason other than it seemed to satisfy the above in the cases we tested.
There was a problem hiding this comment.
ok, I'm going to add that as a comment though to make it easier to understand in the future
rtolspecification whereatolis also specified