8000 Revert "FIX Hotfix Skip non deterministic tests on PowerPC (#13323)" · xhluca/scikit-learn@df62c79 · GitHub
[go: up one dir, main page]

Skip to content

Commit df62c79

Browse files
author
Xing
authored
Revert "FIX Hotfix Skip non deterministic tests on PowerPC (scikit-learn#13323)"
This reverts commit b76763e.
1 parent 97e0a22 commit df62c79

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

sklearn/base.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import copy
77
import warnings
88
from collections import defaultdict
9-
import platform
9+
import struct
1010
import inspect
1111

1212
import numpy as np
@@ -555,11 +555,10 @@ def _more_tags(self):
555555
return {'multioutput': True}
556556

557557

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

564563

565564
def is_classifier(estimator):

sklearn/cross_decomposition/cca_.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from .pls_ import _PLS
2-
from ..base import _UnstableArchMixin
2+
from ..base import _UnstableOn32BitMixin
33

44
__all__ = ['CCA']
55

66

7-
class CCA(_PLS, _UnstableArchMixin):
7+
class CCA(_PLS, _UnstableOn32BitMixin):
88
"""CCA Canonical Correlation Analysis.
99
1010
CCA inherits from PLS with mode="B" and deflation_mode="canonical".

sklearn/manifold/locally_linear.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from scipy.sparse import eye, csr_matrix
1010
from scipy.sparse.linalg import eigsh
1111

12-
from ..base import BaseEstimator, TransformerMixin, _UnstableArchMixin
12+
from ..base import BaseEstimator, TransformerMixin, _UnstableOn32BitMixin
1313
from ..utils import check_random_state, check_array
1414
from ..utils.extmath import stable_cumsum
1515
from ..utils.validation import check_is_fitted
@@ -519,7 +519,7 @@ def locally_linear_embedding(
519519

520520

521521
class LocallyLinearEmbedding(BaseEstimator, TransformerMixin,
522-
_UnstableArchMixin):
522+
_UnstableOn32BitMixin):
523523
"""Locally Linear Embedding
524524
525525
Read more in the :ref:`User Guide <locally_linear_embedding>`.

0 commit comments

Comments
 (0)
0