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

Commit

Permalink
fix flaky
Browse files Browse the repository at this point in the history
  • Loading branch information
szha committed Jul 29, 2020
1 parent b705383 commit f1b53ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/python/unittest/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
import logging
import os.path as op
import platform
import pytest

@pytest.mark.garbage_expected
def test_environment():
name1 = 'MXNET_TEST_ENV_VAR_1'
name2 = 'MXNET_TEST_ENV_VAR_2'
Expand Down
6 changes: 3 additions & 3 deletions tests/python/unittest/test_gluon_probability_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def hybrid_forward(self, F, n, params, *args):
# Test log_prob
for shape, hybridize, use_logit in itertools.product(shapes, [True, False], [True, False]):
n = np.random.randint(1, 10, size=shape).astype('float32')
prob = np.random.uniform(low=0.1, size=shape)
prob = np.random.uniform(low=0.1, size=shape).astype('float32')
sample = np.random.randint(0, 10, size=shape).astype('float32')
param = prob
if use_logit:
Expand All @@ -559,7 +559,7 @@ def hybrid_forward(self, F, n, params, *args):
for func in ['mean', 'variance']:
for use_logit in [True, False]:
n = np.random.randint(1, 10, size=shape).astype('float32')
prob = np.random.uniform(low=0.1, size=shape)
prob = np.random.uniform(low=0.1, size=shape).astype('float32')
net = TestNegativeBinomial(func, use_logit)
param = prob
if use_logit:
Expand Down Expand Up @@ -2015,7 +2015,7 @@ def hybrid_forward(self, F, logit, *args):
def test_gluon_kl_v1():
def _test_zero_kl(p, shape):
"""Check if KL(p || p) = 0
Parameters
----------
p : Distribution
Expand Down

0 comments on commit f1b53ab

Please sign in to comment.