Skip to content

Commit d70611e

Browse files
committed
Increase test tolerance for upcoming JAX PRNG change.
PiperOrigin-RevId: 580023819
1 parent 40b9c7a commit d70611e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

tensorflow_probability/python/distributions/transformed_distribution_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -769,8 +769,7 @@ def testMVN(self, event_shape, shift, tril, dynamic_shape):
769769
num_samples = 7e3
770770
y = fake_mvn.sample(int(num_samples), seed=test_util.test_seed())
771771
x = y[0:5, ...]
772-
self.assertAllMeansClose(y, expected_mean, axis=0,
773-
atol=0.1, rtol=0.1)
772+
self.assertAllMeansClose(y, expected_mean, axis=0, atol=0.25)
774773
self.assertAllClose(expected_cov, sample_stats.covariance(y, sample_axis=0),
775774
atol=0., rtol=0.1)
776775

tensorflow_probability/python/distributions/two_piece_normal_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def get_abs_sample_mean(skewness):
369369

370370
err = self.compute_max_gradient_error(
371371
get_abs_sample_mean, [tf.constant(skewness, self.dtype)], delta=1e-1)
372-
maxerr = 0.05 if self.dtype == np.float64 else 0.09
372+
maxerr = 0.2
373373
self.assertLess(err, maxerr)
374374

375375
@test_util.numpy_disable_gradient_test

tensorflow_probability/python/math/special_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ def _test_betaincinv_value(self, a_high, b_high, dtype, atol, rtol):
560560
"rtol": 2e-3},
561561
{"testcase_name": "float64",
562562
"dtype": np.float64,
563-
"atol": 1e-12,
564-
"rtol": 1e-11})
563+
"atol": 3e-12,
564+
"rtol": 3e-11})
565565
def testBetaincinvSmall(self, dtype, atol, rtol):
566566
self._test_betaincinv_value(
567567
a_high=1., b_high=1., dtype=dtype, atol=atol, rtol=rtol)

0 commit comments

Comments
 (0)