-
Notifications
You must be signed in to change notification settings - Fork 36
looser numeric tolerance for TestUtils.test_interface #455
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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
@@ -1,7 +1,7 @@ | |||
module TestUtils | |||
|
|||
const __ATOL = 1e-9 | |||
const __RTOL = 1e-9 | |||
const __ATOL = sqrt(eps(Float64)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm going to add that as a comment though to make it easier to understand in the future
rtol
specification whereatol
is also specified