Skip to content

Loosen tolerance on test#495

Open
willtebbutt wants to merge 4 commits intomasterfrom
wct/mo-test-fix
Open

Loosen tolerance on test#495
willtebbutt wants to merge 4 commits intomasterfrom
wct/mo-test-fix

Conversation

@willtebbutt
Copy link
Copy Markdown
Member

Summary
Replaces an equality test with an approximate equality test to handle roundoff issues. Should resolve #494

Proposed changes
Loosen a test tolerance very slightly

What alternatives have you considered?
None

Breaking changes
None

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (8746034) to head (9e30e87).
⚠️ Report is 60 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #495   +/-   ##
=======================================
  Coverage   94.25%   94.25%           
=======================================
  Files          52       52           
  Lines        1374     1374           
=======================================
  Hits         1295     1295           
  Misses         79       79           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread test/mokernels/independent.jl Outdated
@willtebbutt
Copy link
Copy Markdown
Member Author

@mjp98 if you could confirm that this seems to fix things on your end, I'll merge

Comment on lines +18 to +20
@test isapprox(
kernelmatrix(k, x, y), kernelmatrix(k, collect(x), collect(y)); rtol=1e-6
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the non-standard rtol needed, in particular if we fix the seeds with StableRNGs? Maybe

Suggested change
@test isapprox(
kernelmatrix(k, x, y), kernelmatrix(k, collect(x), collect(y)); rtol=1e-6
)
@test kernelmatrix(k, x, y) kernelmatrix(k, collect(x), collect(y))

would be sufficient?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Independent mokernel failing numerical equality test randomly

3 participants