Skip to content

Commit

Permalink
Disable tests of numpy operators implemented with CustomOp (apache#18151
Browse files Browse the repository at this point in the history
)

These tests are prone to triggering a deadlock. See apache#18090 apache#18144
  • Loading branch information
leezu authored and AntiZpvoh committed Jul 6, 2020
1 parent 40b988a commit cf8ab83
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/python/unittest/test_numpy_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -4470,6 +4470,7 @@ def test_np_randn():

@with_seed()
@use_np
@pytest.mark.skip(reason='Test hangs. Tracked in #18144')
def test_np_multivariate_normal():
class TestMultivariateNormal(HybridBlock):
def __init__(self, size=None):
Expand Down Expand Up @@ -8266,6 +8267,7 @@ def g(data):

@with_seed()
@use_np
@pytest.mark.skip(reason='Test hangs. Tracked in #18144')
def test_np_resize():
class TestResize(HybridBlock):
def __init__(self, new_shape):
Expand Down Expand Up @@ -8602,13 +8604,13 @@ def hybrid_forward(self, F, a):
mx_out_imperative = getattr(mx.np, func)(mx_data)
assert_almost_equal(mx_out_imperative.asnumpy(), np_out, rtol, atol)
# if `out` is given and dtype == np.bool
mx_x = np.empty_like(mx_data).astype(np.bool)
mx_x = np.ones_like(mx_data).astype(np.bool)
np_x = mx_x.asnumpy()
getattr(mx.np, func)(mx_data, mx_x)
np_func(np_data, np_x)
assert_almost_equal(mx_out_imperative .asnumpy(), np_out, rtol, atol)
# if `out` is given but dtype mismatches
mx_y = np.empty_like(mx_data)
mx_y = np.ones_like(mx_data)
assertRaises(TypeError, getattr(np, func), mx_data, out=mx_y)

assertRaises(NotImplementedError, getattr(np, func), mx_data, where=False)
Expand Down Expand Up @@ -8830,6 +8832,7 @@ def hybrid_forward(self, F, x):

@with_seed()
@use_np
@pytest.mark.skip(reason='Test hangs. Tracked in #18144')
def test_np_unravel_index():
class TestUnravel_index(HybridBlock):
def __init__(self, shape, order='C') :
Expand Down

0 comments on commit cf8ab83

Please sign in to comment.