From d917ca0c368c67cd54087e4c2554a91f6e60bc8e Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Thu, 23 Apr 2020 18:11:16 +0000 Subject: [PATCH 1/3] Disable tests of numpy operators implemented with CustomOp --- tests/python/unittest/test_numpy_op.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 3b11b35742b1..4f32fe5038f2 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -4382,6 +4382,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): @@ -8178,6 +8179,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): @@ -8742,6 +8744,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') : From 2665597d3c68e7eab99b0b76b9e59cd79fdc7573 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Thu, 23 Apr 2020 23:30:49 +0000 Subject: [PATCH 2/3] Disable test_np_kron --- tests/python/unittest/test_numpy_op.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 4f32fe5038f2..39269209ab2f 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -557,6 +557,7 @@ def ShapeReduce(mat, shape, is_b=False): @with_seed() @use_np +@pytest.mark.skip(reason='Test hangs. Tracked in #18144') def test_np_kron(): def np_kron_backward(ograd, a, b): ndim = ograd.ndim @@ -8516,13 +8517,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) From a4148f24ecc42e49dc4f4ec9dc334b4c6fec4298 Mon Sep 17 00:00:00 2001 From: Leonard Lausen Date: Fri, 24 Apr 2020 01:48:23 +0000 Subject: [PATCH 3/3] Reenable test_np_kron --- tests/python/unittest/test_numpy_op.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py index 39269209ab2f..27969c75f683 100644 --- a/tests/python/unittest/test_numpy_op.py +++ b/tests/python/unittest/test_numpy_op.py @@ -557,7 +557,6 @@ def ShapeReduce(mat, shape, is_b=False): @with_seed() @use_np -@pytest.mark.skip(reason='Test hangs. Tracked in #18144') def test_np_kron(): def np_kron_backward(ograd, a, b): ndim = ograd.ndim