pyro-ppl / pyro

Deep universal probabilistic programming with Python and PyTorch
http://pyro.ai
Apache License 2.0
8.59k stars 988 forks source link

Have a tunable precision for population statistic testing in test_distributions #125

Closed neerajprad closed 7 years ago

neerajprad commented 7 years ago

The unit test on the recent dev branch failed because our tests for TestNormalChol.test_mean_and_var and TestNormal.test_mean_and_var were just outside the tolerance threshold. We can fix this by increasing the number of samples drawn from the distribution, but rather than specifying this value for each test in test_distributions.py, we can follow webPPL's example where the precision is configurable (say, at 0.99 for unit tests), and we can calculate the number of samples needed. Refer to the parent task - #16

neerajprad commented 7 years ago

Addressed as part of #16.