Skip to content

Commit 9ac2b6b

Browse files
SiegeLordExtensorflower-gardener
authored andcommitted
Hypothesis: Also silence cholesky errors when constructing the distribution.
PiperOrigin-RevId: 387202839
1 parent d148fd5 commit 9ac2b6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_probability/python/distributions/distribution_properties_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ def testCanConstructAndSampleDistribution(self, data):
370370
@hp.given(hps.data())
371371
@tfp_hps.tfp_hp_settings()
372372
def testInferredBatchShapeMatchesTrueBatchShape(self, dist_name, data):
373-
dist = data.draw(
374-
dhps.distributions(dist_name=dist_name, validate_args=False))
375373
with tfp_hps.no_cholesky_decomposition_errors():
374+
dist = data.draw(
375+
dhps.distributions(dist_name=dist_name, validate_args=False))
376376
lp = dist.log_prob(dist.sample(seed=test_util.test_seed()))
377377

378378
self.assertAllEqual(dist.batch_shape_tensor(), tf.shape(lp))

0 commit comments

Comments
 (0)