Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
set success_rate to 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stu1130 committed Apr 1, 2019
1 parent 33b6543 commit 4d6587e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/python/unittest/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,12 +576,12 @@ def test_poisson_generator():
buckets = [(-1.0, lam - 0.5), (lam - 0.5, 2 * lam + 0.5), (2 * lam + 0.5, np.inf)]
probs = [ss.poisson.cdf(bucket[1], lam) - ss.poisson.cdf(bucket[0], lam) for bucket in buckets]
generator_mx = lambda x: mx.nd.random.poisson(lam, shape=x, ctx=ctx, dtype=dtype).asnumpy()
verify_generator(generator=generator_mx, buckets=buckets, probs=probs)
verify_generator(generator=generator_mx, buckets=buckets, probs=probs, success_rate=0.2)
generator_mx_same_seed = \
lambda x: np.concatenate(
[mx.nd.random.poisson(lam, shape=x // 10, ctx=ctx, dtype=dtype).asnumpy()
for _ in range(10)])
verify_generator(generator=generator_mx_same_seed, buckets=buckets, probs=probs)
verify_generator(generator=generator_mx_same_seed, buckets=buckets, probs=probs, success_rate=0.2)

@unittest.skip("Flaky test. Tracked in https://github.com/apache/incubator-mxnet/issues/13506")
@with_seed()
Expand Down

0 comments on commit 4d6587e

Please sign in to comment.