You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by la...@apache.org on 2020/11/17 23:18:29 UTC

[incubator-mxnet] 01/01: Mark test_np_around as flaky

This is an automated email from the ASF dual-hosted git repository.

lausen pushed a commit to branch leezu-patch-3
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git

commit 7a90b993cb393eab7c13153865bd884e1b8f5977
Author: Leonard Lausen <la...@amazon.com>
AuthorDate: Tue Nov 17 15:16:44 2020 -0800

    Mark test_np_around as flaky
    
    [2020-11-16T18:27:31.310Z]                         if hybridize:
    [2020-11-16T18:27:31.310Z]                             test_around.hybridize()
    [2020-11-16T18:27:31.310Z]                         x = rand_ndarray(shape, dtype=oneType).as_np_ndarray()
    [2020-11-16T18:27:31.310Z]                         np_out = _np.around(x.asnumpy(), d)
    [2020-11-16T18:27:31.310Z]                         mx_out = test_around(x)
    [2020-11-16T18:27:31.310Z]                         assert mx_out.shape == np_out.shape
    [2020-11-16T18:27:31.310Z] >                       assert_almost_equal(mx_out.asnumpy(), np_out, rtol=rtol, atol=atol)
    [...]
    [2020-11-16T18:27:31.311Z] >       raise AssertionError(msg)
    [2020-11-16T18:27:31.311Z] E       AssertionError:
    [2020-11-16T18:27:31.311Z] E       Items are not equal:
    [2020-11-16T18:27:31.311Z] E       Error 1.002051 exceeds tolerance rtol=1.000000e-03, atol=1.000000e-05.
    [2020-11-16T18:27:31.311Z] E
    [2020-11-16T18:27:31.311Z] E        ACTUAL: array(-0.989, dtype=float32)
    [2020-11-16T18:27:31.311Z] E        DESIRED: -0.988
---
 tests/python/unittest/test_numpy_op.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/python/unittest/test_numpy_op.py b/tests/python/unittest/test_numpy_op.py
index dab8545..0b6f5db 100644
--- a/tests/python/unittest/test_numpy_op.py
+++ b/tests/python/unittest/test_numpy_op.py
@@ -7541,6 +7541,7 @@ def test_np_flipud_fliplr():
 
 
 @use_np
+@pytest.mark.flaky
 def test_np_around():
     class TestAround(HybridBlock):
         def __init__(self, decimals):