Repository navigation
Closed
Labels
Milestone
Description
There are a number of failures on our non-intel platforms, which currently prevent scikit-learn from migration to the upcoming "buster" release.
The logs can be found here.
Relevant Debian bug is Debian#919918.
test_estimate_bandwidth_1sample
(on arm64, s390x, ppc64)
def test_estimate_bandwidth_1sample():
# Test estimate_bandwidth when n_samples=1 and quantile<1, so that
# n_neighbors is set to 1.
bandwidth = estimate_bandwidth(X, n_samples=1, quantile=0.3)
> assert_equal(bandwidth, 0.)
sklearn/cluster/tests/test_mean_shift.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python2.7/unittest/case.py:513: in assertEqual
assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <sklearn.utils._unittest_backport.TestCase testMethod=__init__>
first = 2.384185791015625e-07, second = 0.0
msg = '2.384185791015625e-07 != 0.0'
def _baseAssertEqual(self, first, second, msg=None):
"""The default assertEqual implementation, not type specific."""
if not first == second:
standardMsg = '%s != %s' % (safe_repr(first), safe_repr(second))
msg = self._formatMessage(msg, standardMsg)
> raise self.failureException(msg)
E AssertionError: 2.384185791015625e-07 != 0.0
/usr/lib/python2.7/unittest/case.py:506: AssertionError
test_decode_anneal
(on arm64, armel)
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0xffff8ac04790>
def test_decode_anneal(monkeypatch):
data_id = 2
_monkey_patch_webbased_functions(monkeypatch, data_id, False)
> _test_features_list(data_id)
sklearn/datasets/tests/test_openml.py:336:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data_id = 2
def _test_features_list(data_id):
[...]
for i in range(len(data_bunch.feature_names)):
# XXX: Test per column, as this makes it easier to avoid problems with
# missing values
np.testing.assert_array_equal(data_downloaded[:, i],
> decode_column(data_bunch, i))
E AssertionError:
E Arrays are not equal
E
E (mismatch 100.0%)
E x: array([None, None, None, None, None, None, None, None, None, None, None],
E dtype=object)
E y: array(['GB', 'GB', 'GB', 'GB', 'GB', 'GB', 'GB', 'GB', 'GB', 'GB', 'GB'],
E dtype=object)
sklearn/datasets/tests/test_openml.py:65: AssertionError
test_dump
(on arm64)
def test_dump():
[...]
for X in (X_sparse, X_dense, X_sliced):
for y in (y_sparse, y_dense, y_sliced):
for zero_based in (True, False):
for dtype in [np.float32, np.float64, np.int32]:
[...]
if dtype == np.float32:
# allow a rounding error at the last decimal place
assert_array_almost_equal(
X_dense.astype(dtype), X2_dense, 4)
assert_array_almost_equal(
y_dense.astype(dtype), y2, 4)
else:
# allow a rounding error at the last decimal place
assert_array_almost_equal(
> X_dense.astype(dtype), X2_dense, 15)
E AssertionError:
E Arrays are not almost equal to 15 decimals
E
E (mismatch 0.793650793651%)
E x: array([[ 0, 0, 2, 0, 0,
E 0, 0, 0, 0, 0,
E -5, 0, 0, 0, 0,...
E y: array([[ 0, 0, 2, 0, 0,
E 0, 0, 0, 0, 0,
E -5, 0, 0, 0, 0,...
sklearn/datasets/tests/test_svmlight_format.py:267: AssertionError
test_matthews_corrcoef_multiclass
(on armel)
def test_matthews_corrcoef_multiclass():
[...]
# Zero variance will result in an mcc of zero and a Runtime Warning
y_true = [0, 1, 2]
y_pred = [3, 3, 3]
mcc = assert_warns_message(RuntimeWarning, 'invalid value encountered',
> matthews_corrcoef, y_true, y_pred)
sklearn/metrics/tests/test_classification.py:515:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
warning_class = <type 'exceptions.RuntimeWarning'>
message = 'invalid value encountered'
func = <function matthews_corrcoef at 0xb2af0530>, args = ([0, 1, 2], [3, 3, 3])
kw = {}, w = [], result = 0.0
def assert_warns_message(warning_class, message, func, *args, **kw):
# very important to avoid uncontrolled state propagation
"""{...]"""
clean_warning_registry()
with warnings.catch_warnings(record=True) as w:
# Cause all warnings to always be triggered.
warnings.simplefilter("always")
if hasattr(np, 'VisibleDeprecationWarning'):
# Let's not catch the numpy internal DeprecationWarnings
warnings.simplefilter('ignore', np.VisibleDeprecationWarning)
# Trigger a warning.
result = func(*args, **kw)
# Verify some things
if not len(w) > 0:
raise AssertionError("No warning raised when calling %s"
> % func.__name__)
E AssertionError: No warning raised when calling matthews_corrcoef
sklearn/utils/testing.py:200: AssertionError
Bus error in sklearn/neighbors/tests/test_lof.py
(on armhf)
test_non_meta_estimators[KernelPCA-KernelPCA-check_pipeline_consistency]
(on ppc64el; repeats similarly three times)
name = 'KernelPCA'
Estimator = <class 'sklearn.decomposition.kernel_pca.KernelPCA'>
check = <function check_pipeline_consistency at 0x3fff8b056b18>
@pytest.mark.parametrize(
"name, Estimator, check",
_generate_checks_per_estimator(_yield_all_checks,
_tested_non_meta_estimators()),
ids=_rename_partial
)
def test_non_meta_estimators(name, Estimator, check):
# Common tests for non-meta estimators
with ignore_warnings(category=(DeprecationWarning, ConvergenceWarning,
UserWarning, FutureWarning)):
estimator = Estimator()
set_checking_parameters(estimator)
> check(name, estimator)
sklearn/tests/test_common.py:101:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
sklearn/utils/testing.py:350: in wrapper
return fn(*args, **kwargs)
sklearn/utils/estimator_checks.py:1048: in check_pipeline_consistency
assert_allclose_dense_sparse(result, result_pipe)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
x = array([[ 9.17543358e-01, 4.04410079e-02, 2.21585378e-02,
-2.69563828..., 2.47000231e-11,
2.81623715e-09, 1.36863809e-09, 1.28803077e-09]])
y = array([[ 9.17543358e-01, 4.04410079e-02, 2.21585378e-02,
-2.69560026..., -6.90266524e-10,
-8.33997668e-11, 1.37018888e-09, 2.03087265e-09]])
rtol = 1e-07, atol = 1e-09, err_msg = ''
def assert_allclose_dense_sparse(x, y, rtol=1e-07, atol=1e-9, err_msg=''):
"""[...]"""
if sp.sparse.issparse(x) and sp.sparse.issparse(y):
x = x.tocsr()
y = y.tocsr()
x.sum_duplicates()
y.sum_duplicates()
assert_array_equal(x.indices, y.indices, err_msg=err_msg)
assert_array_equal(x.indptr, y.indptr, err_msg=err_msg)
assert_allclose(x.data, y.data, rtol=rtol, atol=atol, err_msg=err_msg)
elif not sp.sparse.issparse(x) and not sp.sparse.issparse(y):
# both dense
> assert_allclose(x, y, rtol=rtol, atol=atol, err_msg=err_msg)
E AssertionError:
E Not equal to tolerance rtol=1e-07, atol=1e-09
E
E (mismatch 13.7777777778%)
E x: array([[ 9.175434e-01, 4.044101e-02, 2.215854e-02, -2.695638e-08,
E 3.128852e-08, 0.000000e+00, 0.000000e+00, 0.000000e+00,
E 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,...
E y: array([[ 9.175434e-01, 4.044101e-02, 2.215854e-02, -2.695600e-08,
E 3.128926e-08, 0.000000e+00, 0.000000e+00, 0.000000e+00,
E 0.000000e+00, 0.000000e+00, 0.000000e+00, 0.000000e+00,...
sklearn/utils/testing.py:464: AssertionError
Activity
jnothman commentedon Jan 23, 2019
olebole commentedon Jan 23, 2019
What about the bus error on armhf (
testlof.py)? armhf is a bit picky about alignment, so this could be a hint that something was unaligned.jnothman commentedon Jan 23, 2019
jnothman commentedon Jan 26, 2019
#10561 reports the first issue; #12548 reports two on amd64. I think the first issue is likely fixed in 0.20.2, but apparently there is no Debian build of 0.20.2?
The bus error is certainly surprising. Is it reasonable to believe this was not caused by test_lof.py?
It might be best to raise a separate issue for each of these. But it would be much more helpful if we were offered access to machines where we can debug. What would you recommend?
olebole commentedon Jan 26, 2019
We are still on 0.20.1; however (if there is no veto from our science team) I would upgrade first and see which failures are left. I will then move the remaining bugs into separate issues. Let's then see how to proceed.
jnothman commentedon Jan 26, 2019
olebole commentedon Jan 27, 2019
I split this in several issues and therefore close it.
rth commentedon Jan 27, 2019
Thanks for reporting these @olebole !
I can reproduce the 3 failures that happen on ARM 64 bit. If anyone is interested in investigating those I can provide access to an ARM machine.
I think it might be still useful to keep this issue open (until all of these are fixed) for the general discussion about how we should handle tests on non-x86 platforms.
rth commentedon Feb 25, 2019
More specifically, I can reproduce these errors,
but I just realized this was with master from 1 month ago. Will try to re-run with the lastest master.
jnothman commentedon Feb 25, 2019
Your results aren't on master, are they @rth?
test_estimate_bandwidth_1sampleshould be fixed.rth commentedon Feb 25, 2019
They weren't indeed (these were from 1 month ago), rerunning on master now..
rth commentedon Feb 25, 2019
Here are the tests failures on 64bit ARM on master,
this is with the latest numpy and numpydoc so there are some doctests failures that were not seen in the Debian builds.
jnothman commentedon Apr 9, 2019
What's the status of our ARM support, @rth? are we good on ARM64 now at least?
rth commentedon Apr 10, 2019
I need to go through all the linked issues, but as far as I remember we fixed (or sometimes skipped) everything that we could reproduce, in particular on ARM64.
rth commentedon Jun 25, 2019
This can be closed once aarch64 and ppcle64 build of 0.21.2 succeed on conda-forge conda-forge/scikit-learn-feedstock#98 (we might need to fix a few more failures before).
jayfurmanek commentedon Aug 12, 2019
FYI
The conda-forge build did complete on ppc64le, but the recipe skips the estimate_bandwidth_1sample test:
https://github.com/conda-forge/scikit-learn-feedstock/blob/master/recipe/meta.yaml#L51
rth commentedon Aug 14, 2019
Thanks for the summary @jayfurmanek ! That build was for 0.21.2 and the estimate_bandwidth_1sample should have been fixed 24b6934 I would rather close this issue and re-open #10561 if needed.