Skip to content
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

Bugfix for #6143, flakey K-means test in GP submodule #6157

Merged
merged 1 commit into from
Sep 28, 2022

Conversation

bwengals
Copy link
Contributor

@bwengals bwengals commented Sep 28, 2022

closes #6143.

One of the tests of the GP model tests that the kmeans method for locating inducing points works correctly. It uses an example that should be easy for K-means, a 1d normal mixture model, with mu at -5 and the other at 5, both with sigma=1. Occasionally the tests give an answer that is close enough, like [-4.98, 5.1], but doesn't pass the tests. This PR uses a 5% relative tolerance instead.

Checklist

Major / Breaking Changes

  • NA

Bugfixes / New features

Docs / Maintenance

  • NA

@bwengals bwengals changed the title use a .05 relative tolerance instead of absolute Bugfix for #6143 Sep 28, 2022
@bwengals bwengals changed the title Bugfix for #6143 Bugfix for #6143, flakey K-means test in GP submodule Sep 28, 2022
@codecov
Copy link

codecov bot commented Sep 28, 2022

Codecov Report

Merging #6157 (5e7d348) into main (b12c189) will increase coverage by 5.07%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6157      +/-   ##
==========================================
+ Coverage   87.94%   93.02%   +5.07%     
==========================================
  Files          91       91              
  Lines       20707    20707              
==========================================
+ Hits        18211    19262    +1051     
+ Misses       2496     1445    -1051     
Impacted Files Coverage Δ
pymc/tests/gp/test_util.py 100.00% <100.00%> (ø)
pymc/smc/smc.py 97.24% <0.00%> (+0.78%) ⬆️
pymc/step_methods/hmc/base_hmc.py 90.55% <0.00%> (+0.78%) ⬆️
pymc/parallel_sampling.py 86.79% <0.00%> (+0.99%) ⬆️
pymc/distributions/censored.py 100.00% <0.00%> (+7.50%) ⬆️
pymc/distributions/simulator.py 87.23% <0.00%> (+53.19%) ⬆️
pymc/distributions/bound.py 100.00% <0.00%> (+54.36%) ⬆️
pymc/distributions/truncated.py 99.30% <0.00%> (+64.33%) ⬆️
pymc/sampling_jax.py 97.18% <0.00%> (+97.18%) ⬆️
pymc/tests/distributions/test_simulator.py 99.50% <0.00%> (+99.50%) ⬆️
... and 3 more

@ricardoV94 ricardoV94 added the no releasenotes Skipped in automatic release notes generation label Sep 28, 2022
@bwengals
Copy link
Contributor Author

thanks for flagging this Ricardo

@bwengals bwengals merged commit c5ae227 into pymc-devs:main Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no releasenotes Skipped in automatic release notes generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky tests/gp/test_util.py::TestKmeansInducing::test_kmeans
2 participants