scikit-learn: test_omp_cv fails with MKL and AVX-512
In newly released scikit-learn 0.20.1 (and actually in 0.20.0) test_omp_cv case fails during running test suite. Any help appreciated!
_______________________________ test_omp_cv _______________________________
def test_omp_cv():
y_ = y[:, 0]
gamma_ = gamma[:, 0]
ompcv = OrthogonalMatchingPursuitCV(normalize=True, fit_intercept=False,
max_iter=10, cv=5)
ompcv.fit(X, y_)
> assert_equal(ompcv.n_nonzero_coefs_, n_nonzero_coefs)
/usr/local/lib/python3.6/dist-packages/scikit_learn-0.20.1-py3.6-linux-x86_64.egg/sklearn/linear_model/tests/test_omp.py:209:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.6/unittest/case.py:829: in assertEqual
assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>, first = 6, second = 5, msg = '6 != 5'
def _baseAssertEqual(self, first, second, msg=None):
"""The default assertEqual implementation, not type specific."""
if not first == second:
standardMsg = '%s != %s' % _common_shorten_repr(first, second)
msg = self._formatMessage(msg, standardMsg)
> raise self.failureException(msg)
E AssertionError: 6 != 5
/usr/lib/python3.6/unittest/case.py:822: AssertionError
Versions
System: python: 3.6.7 (default, Oct 22 2018, 11:32:17) [GCC 8.2.0] executable: /usr/bin/python3 machine: Linux-4.15.0-39-generic-x86_64-with-Ubuntu-18.04-bionic
BLAS: macros: SCIPY_MKL_H=None, HAVE_CBLAS=None lib_dirs: /opt/intel/mkl/lib/intel64 cblas_libs: mkl_rt, pthread
Python deps: pip: 18.1 setuptools: 40.6.2 sklearn: 0.20.1 numpy: 1.15.4 scipy: 1.1.0 Cython: 0.29 pandas: None
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 27 (14 by maintainers)
@rth, I can confirm that the test is not failing anymore. Thanks for fixing it!
I re-ran the tests on a Xeon W-2155 CPU with AVX-512 and could reproduce the issue.
@rth
Versions
Traceback
Dockerfile
I build the dockerfile on an EC2 m5 instance. When using that docker image to run the tests on an m5 instance, they will fail. The same image will work on an m4 instance or my laptop, both of which don’t support AVX-512.
Please let me know if there’s anything else I can provide to help diagnose the issue. If you don’t have access to a machine with AVX-512, I think I could also give you access to one.