8000 Hotfix Skip non deterministic tests on PowerPC by rth · Pull Request #13323 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Hotfix Skip non deterministic tests on PowerPC #13323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions sklearn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import copy
import warnings
from collections import defaultdict
import struct
import platform
import inspect

import numpy as np
Expand Down Expand Up @@ -555,10 +555,11 @@ def _more_tags(self):
return {'multioutput': True}


class _UnstableOn32BitMixin(object):
"""Mark estimators that are non-determinstic on 32bit."""
class _UnstableArchMixin(object):
"""Mark estimators that are non-determinstic on 32bit or PowerPC"""
def _more_tags(self):
return {'non_deterministic': _IS_32BIT}
return {'non_deterministic': (
_IS_32BIT or platform.machine().startswith(('ppc', 'powerpc')))}


def is_classifier(estimator):
Expand Down
4 changes: 2 additions & 2 deletions sklearn/cross_decomposition/cca_.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from .pls_ import _PLS
from ..base import _UnstableOn32BitMixin
from ..base import _UnstableArchMixin

__all__ = ['CCA']


class CCA(_PLS, _UnstableOn32BitMixin):
class CCA(_PLS, _UnstableArchMixin):
"""CCA Canonical Correlation Analysis.

CCA inherits from PLS with mode="B" and deflation_mode="canonical".
Expand Down
4 changes: 2 additions & 2 deletions sklearn/manifold/locally_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from scipy.sparse import eye, csr_matrix
from scipy.sparse.linalg import eigsh

from ..base import BaseEstimator, TransformerMixin, _UnstableOn32BitMixin
from ..base import BaseEstimator, TransformerMixin, _UnstableArchMixin
from ..utils import check_random_state, check_array
from ..utils.extmath import stable_cumsum
from ..utils.validation import check_is_fitted
Expand Down Expand Up @@ -519,7 +519,7 @@ def locally_linear_embedding(


class LocallyLinearEmbedding(BaseEstimator, TransformerMixin,
_UnstableOn32BitMixin):
_UnstableArchMixin):
"""Locally Linear Embedding

Read more in the :ref:`User Guide <locally_linear_embedding>`.
Expand Down
0