Skip to content

Commit 86ef733

Browse files
Balandatfacebook-github-bot
authored andcommitted
Increase tolerance for test_EnsemblePosterior (meta-pytorch#2804)
Summary: This test has been causing test failures in the GitHub CI. I was unable to reproduce this locally on my Mac even with the same pytorch build, so I'm increasing the tolerances a bit here to make this less brittle. Pull Request resolved: meta-pytorch#2804 Reviewed By: saitcakmak Differential Revision: D72397870 Pulled By: Balandat fbshipit-source-id: b612e6b4fd7c522044333b3f10e50e8c99188fe3
1 parent 58e8b54 commit 86ef733

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/posteriors/test_ensemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def test_EnsemblePosterior(self):
8282
sample_shape=torch.Size((16,)), base_samples=torch.arange(16)
8383
)
8484
self.assertEqual(samples.shape, p._extended_shape(torch.Size((16,))))
85-
self.assertAllClose(p.mean, samples.mean(dim=0))
86-
self.assertAllClose(p.variance, samples.var(dim=0))
85+
self.assertAllClose(p.mean, samples.mean(dim=0), rtol=1e-04, atol=1e-06)
86+
self.assertAllClose(p.variance, samples.var(dim=0), rtol=1e-04, atol=1e-06)
8787
# test error on base_samples, sample_shape mismatch
8888
with self.assertRaises(ValueError):
8989
p.rsample_from_base_samples(

0 commit comments

Comments
 (0)