FYI: Intel Python Scipy test ends with a failure

FYI: Intel Python Scipy test ends with a failure

The environment:

$ python
Python 3.6.2 |Intel Corporation| (default, Aug 15 2017, 16:14:26)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.
Intel(R) Distribution for Python is brought to you by Intel Corporation.
Please check out: https://software.intel.com/en-us/python-distribution
>>> import sys
>>> import platform
>>> print(str("Installed Python Version is: ")+str(platform.python_version()))
Installed Python Version is: 3.6.2
>>> import numpy
>>> print(str("Installed Numpy version is: ")+str(numpy.__version__))
Installed Numpy version is: 1.13.1
>>> import scipy
>>> print(str("Installed Scipy version is: ")+str(scipy.__version__))
Installed Scipy version is: 0.19.1
>>>

The test:

import scipy
scipy.test("full", verbose=10)

The summary of the test result

======================================================================
FAIL: test_hilbert (test_fir_filter_design.TestMinimumPhase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/intelPython2018_0018/intelpython3/lib/python3.6/site-packages/scipy/signal/tests/test_fir_filter_design.py", line 541, in test_hilbert
    assert_allclose(m, k, rtol=1e-3)
  File "/home/intelPython2018_0018/intelpython3/lib/python3.6/site-packages/numpy/testing/utils.py", line 1395, in assert_allclose
    verbose=verbose, header=header, equal_nan=equal_nan)
  File "/home/intelPython2018_0018/intelpython3/lib/python3.6/site-packages/numpy/testing/utils.py", line 778, in assert_array_compare
    raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=0.001, atol=0

(mismatch 16.66666666666667%)
 x: array([ 0.34949 ,  0.373494,  0.326211,  0.077231, -0.129983, -0.059379])
 y: array([ 0.349586,  0.373552,  0.326083,  0.077152, -0.129944, -0.059356])

----------------------------------------------------------------------
Ran 25594 tests in 1723.918s

FAILED (KNOWNFAIL=153, SKIP=1821, failures=1)

Salut,

Sergio
Enhance your #MachineLearning and #BigData skills via #Python #SciPy
1) https://www.packtpub.com/big-data-and-business-intelligence/numerical-an...
2) https://www.packtpub.com/big-data-and-business-intelligence/learning-sci...

 

 

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Sergio, 

This test failure is benign.

The Hilbert's method to find coefficients of the minimum phase finite impulse response relies on Fourier transform from numpy.fft.

The result of FFT computation can be slightly different from machine to machine, depending on the processor extension supported, and on the order of evaluation of parallel operations.

The line 975 of signal/fir_filter_design.py has a potential to introduce small positive spurious entries, which are further amplified by taking a square root.

The assertion tolerance parameter should be increased to rtol=2e-3, which I will submit to github.com/scipy/scipy

Quote:

Oleksandr P. (Intel) wrote:

Hi Sergio, 

This test failure is benign.

Hi Oleksandr,

  I would hardly consider a numerical computational discrepancy
benign [ http://www.cracked.com/article_19623_6-small-math-errors-that-caused-huge-disasters.html ]
[ http://www-users.math.umn.edu/~arnold/disasters/ ].

I would rather call it "a known (unresolved?) issue"
and  instead of downgrading the accuracy/precision of the test it
is better to (as you well pointed out) alert the users performing
the involved computation that such a discrepancy is around.

Salut,

Sergio

Enhance your #MachineLearning and #BigData skills via #Python #SciPy
1) https://www.packtpub.com/big-data-and-business-intelligence/numerical-and-scientific-computing-scipy-video
2) https://www.packtpub.com/big-data-and-business-intelligence/learning-scipy-numerical-and-scientific-computing-second-edition
3) https://www.researchgate.net/publication/301293668

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today