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/18 02:57:56 UTC

[incubator-mxnet] branch master updated: Mark test_np_average as flaky (#19538)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new f998ac6  Mark test_np_average as flaky (#19538)
f998ac6 is described below

commit f998ac62995a295ef12c22979dd13a62a25d6736
Author: Leonard Lausen <la...@amazon.com>
AuthorDate: Tue Nov 17 19:56:28 2020 -0700

    Mark test_np_average as flaky (#19538)
    
    [2020-11-14T04:52:26.695Z]         if returned:
    [2020-11-14T04:52:26.695Z]             np_out, np_sum_of_weights = np_out
    [2020-11-14T04:52:26.695Z]             mx_out, mx_sum_of_weights = mx_out
    [2020-11-14T04:52:26.695Z]             assert_almost_equal(mx_sum_of_weights.asnumpy(), np_sum_of_weights, rtol=rtol, atol=atol)
    [2020-11-14T04:52:26.695Z]         assert mx_out.shape == np_out.shape
    [2020-11-14T04:52:26.695Z] >       assert_almost_equal(mx_out.asnumpy(), np_out, rtol=rtol, atol=atol)
    [...]
    [2020-11-14T04:52:26.695Z] >       raise AssertionError(msg)
    [2020-11-14T04:52:26.695Z] E       AssertionError:
    [2020-11-14T04:52:26.695Z] E       Items are not equal:
    [2020-11-14T04:52:26.695Z] E       Error 1.772945 exceeds tolerance rtol=1.000000e-03, atol=1.000000e-04.
    [2020-11-14T04:52:26.695Z] E
    [2020-11-14T04:52:26.695Z] E        ACTUAL: array(39093.145, dtype=float32)
    [2020-11-14T04:52:26.695Z] E        DESIRED: 39023.957
---
 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..e4ce7d0 100644
--- a/tests/python/unittest/test_numpy_op.py
+++ b/tests/python/unittest/test_numpy_op.py
@@ -891,6 +891,7 @@ def test_np_max_min_error(func, shape, exception):
 @pytest.mark.parametrize('is_weighted', [True, False])
 @pytest.mark.parametrize('returned', [True, False])
 @pytest.mark.parametrize('req_a', ['null', 'add', 'write'])
+@pytest.mark.flaky
 def test_np_average(a_shape, w_shape, axes, is_weighted, req_a,
                     hybridize, returned, dtype):
     class TestAverage(HybridBlock):