Skip to content

Commit 40b9c7a

Browse files
committed
Increase test tolerances for upcoming JAX PRNG change.
PiperOrigin-RevId: 579940356
1 parent 41c3c00 commit 40b9c7a

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

tensorflow_probability/python/distributions/mvn_tril_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def testSampleLarge(self):
390390
self.assertAllClose(true_mean, sample_mean_, atol=0., rtol=0.03)
391391
self.assertAllClose(true_mean, analytical_mean_, atol=0., rtol=1e-6)
392392

393-
self.assertAllClose(true_covariance, sample_covariance_, atol=0., rtol=0.03)
393+
self.assertAllClose(true_covariance, sample_covariance_, atol=0., rtol=0.04)
394394
self.assertAllClose(
395395
true_covariance, analytical_covariance_, atol=0., rtol=1e-6)
396396

tensorflow_probability/python/experimental/distribute/joint_distribution_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def model():
272272
self.strategy_run(
273273
run, (self.key,), in_axes=None))
274274
for i in range(test_lib.NUM_DEVICES):
275-
self.assertAllClose(sharded_log_prob[i], true_log_prob, atol=2e-2)
275+
self.assertAllClose(sharded_log_prob[i], true_log_prob, atol=0.025)
276276
self.assertAllClose(sharded_log_prob_grad[i], true_log_prob_grad,
277277
atol=2e-2)
278278

tensorflow_probability/python/experimental/psd_kernels/additive_kernel_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def testMatrixValuesAreCorrect(
139139
amplitudes, length_scale, dim, x, y, method='matrix')
140140

141141
self.assertAllClose(
142-
self.evaluate(actual), self.evaluate(expected), rtol=1e-5)
142+
self.evaluate(actual), self.evaluate(expected), rtol=3e-5)
143143

144144
@test_util.disable_test_for_backend(
145145
disable_numpy=True,

tensorflow_probability/python/experimental/sts_gibbs/spike_and_slab_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ def test_posterior_on_nonzero_subset_matches_bayesian_regression(
145145
self.assertAllClose(
146146
nonzero_subvector(self.evaluate(
147147
initial_state.conditional_weights_mean)),
148-
restricted_weights_posterior_mean)
148+
restricted_weights_posterior_mean,
149+
atol=5e-5)
149150
self.assertAllClose(
150151
nonzero_submatrix(initial_state.conditional_posterior_precision_chol),
151152
tf.linalg.cholesky(restricted_weights_posterior_prec.to_dense()))
@@ -346,7 +347,7 @@ def loop_body(var_weights_seed, _):
346347
tf.float32)
347348
self.assertAllClose(nonzero_prior_prob,
348349
tf.reduce_mean(nonzero_weight_samples),
349-
atol=0.03)
350+
atol=0.04)
350351

351352
@parameterized.named_parameters(('', False), ('_xla', True))
352353
def test_deterministic_given_seed(self, use_xla):

0 commit comments

Comments
 (0)