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

[Unit Test]test_numpy_op.py:test_np_mixed_precision_binary_funcs randomly failed due to assertion error #18303

Closed
heaseny opened this issue May 13, 2020 · 1 comment
Labels

Comments

@heaseny
Copy link
Contributor

heaseny commented May 13, 2020

Description

test_numpy_op.py:test_np_mixed_precision_binary_funcs randomly failed due to assertion error, and can be reproduced by test seed.
Test command:
cd tests/python/unittest/
MXNET_TEST_SEED=445183722 nosetests -v -s test_numpy_op.py:test_np_mixed_precision_binary_funcs

Error Message

test_numpy_op.test_np_mixed_precision_binary_funcs ... [INFO] Setting test np/mx/python random seeds, use MXNET_TEST_SEED=445183722 to reproduce.

*** Maximum errors for vector of size 6: rtol=0.01, atol=0.001

1: Error 1.470077 Location of error: (1, 1), a=0.02921580, b=0.02734375
FAIL

======================================================================
FAIL: test_numpy_op.test_np_mixed_precision_binary_funcs

Traceback (most recent call last):
File "/home/mxnet/anacondaenv/anaconda3_mxnet/envs/mxnet_daily_py3/lib/python3.6/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/mxnet/workspace/source/incubator-mxnet/tests/python/unittest/common.py", line 223, in test_new
orig_test(*args, **kwargs)
File "/home/mxnet/anacondaenv/anaconda3_mxnet/envs/mxnet_daily_py3/lib/python3.6/site-packages/mxnet-2.0.0-py3.6.egg/mxnet/util.py", line 297, in _with_np_shape
return func(*args, **kwargs)
File "/home/mxnet/anacondaenv/anaconda3_mxnet/envs/mxnet_daily_py3/lib/python3.6/site-packages/mxnet-2.0.0-py3.6.egg/mxnet/util.py", line 481, in _with_np_array
return func(*args, **kwargs)
File "/home/mxnet/workspace/source/incubator-mxnet/tests/python/unittest/test_numpy_op.py", line 2655, in test_np_mixed_precision_binary_funcs
check_mixed_precision_binary_func(func, low, high, lshape, rshape, lgrad, rgrad, type1, type2)
File "/home/mxnet/workspace/source/incubator-mxnet/tests/python/unittest/test_numpy_op.py", line 2595, in check_mixed_precision_binary_func
use_broadcast=False, equal_nan=True)
File "/home/mxnet/anacondaenv/anaconda3_mxnet/envs/mxnet_daily_py3/lib/python3.6/site-packages/mxnet-2.0.0-py3.6.egg/mxnet/test_utils.py", line 637, in assert_almost_equal
raise AssertionError(msg)
AssertionError:
Error 1.470077 exceeds tolerance rtol=1.000000e-02, atol=1.000000e-03 (mismatch 16.666667%).
Location of maximum error: (1, 1), a=0.02921580, b=0.02734375
ACTUAL: array([[2.87304688, 1.95996094, 1.35742188],
[3.35351562, 0.0292158 , 3.74609375]])
DESIRED: array([[2.87304688, 1.95996094, 1.35742188],
[3.35351562, 0.02734375, 3.74609375]])
-------------------- >> begin captured logging << --------------------
common: INFO: Setting test np/mx/python random seeds, use MXNET_TEST_SEED=445183722 to reproduce.
root: INFO: NumPy-shape semantics has been activated in your code. This is required for creating and manipulating scalar and zero-size tensors, which were not supported in MXNet before, as in the official NumPy library. Please DO NOT manually deactivate this semantics while using mxnet.numpy and mxnet.numpy_extension modules.
--------------------- >> end captured logging << ---------------------


Ran 1 test in 2.560s

FAILED (failures=1)

To Reproduce

Test command:
build with latest commit on master branch and run with the below commands:
cd tests/python/unittest/
MXNET_TEST_SEED=445183722 nosetests -v -s

Steps to reproduce

(Paste the commands you ran that produced the error.)

  1. Build with mkl and install mxnet
    make -j USE_MKLDNN=1 USE_OPENCV=1 USE_BLAS=mkl USE_GPERFTOOLS=0 USE_INTEL_PATH=/opt/intel/
  2. Run with the below command:
    cd tests/python/unittest/
    MXNET_TEST_SEED=445183722 nosetests -v -s test_numpy_op.py:test_np_mixed_precision_binary_funcs

Environment

Centos7.6
python3.6.8
GCC7.3.1
cmake:3.14.0
CPU

@heaseny heaseny added the Bug label May 13, 2020
@leezu
Copy link
Contributor

leezu commented May 13, 2020

Thanks @heaseny . This is a duplicate of #16848

@leezu leezu closed this as completed May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants