Skip to content

Commit

Permalink
Permit inf samples in ParameterBijectorsTest.
Browse files Browse the repository at this point in the history
During Hypothesis testing in ParameterBijectorsTest, some distributions (such as `GammaGamma`) can generate samples too large to be represented in float32.  This change updates the test to just check that samples are non-non, instead of checking that all samples are finite.

PiperOrigin-RevId: 341067297
  • Loading branch information
jburnim authored and tensorflower-gardener committed Nov 6, 2020
1 parent 2c75fb3 commit b354e63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,8 @@ def testCanConstructAndSampleDistribution(self, data):
x = self.evaluate(new_dist.sample(seed=test_util.test_seed()))
self.assertEqual(sample_shape, x.shape)

# Valid parameters should give finite samples.
self.assertAllFinite(x)
# Valid parameters should give non-nan samples.
self.assertAllFalse(np.isnan(x))


def _all_shapes(thing):
Expand Down

0 comments on commit b354e63

Please sign in to comment.