Skip to content

TST Skip test when unstable openblas configuration #21702

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 10 commits into from
Nov 18, 2021
15 changes: 14 additions & 1 deletion sklearn/utils/estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
from ..model_selection import ShuffleSplit
from ..model_selection._validation import _safe_split
from ..metrics.pairwise import rbf_kernel, linear_kernel, pairwise_distances
from ..utils.fixes import threadpool_info
from ..utils.validation import check_is_fitted

from . import shuffle
Expand Down Expand Up @@ -2080,7 +2081,19 @@ def check_classifiers_train(
X_b -= X_b.min()

if readonly_memmap:
X_m, y_m, X_b, y_b = create_memmap_backed_data([X_m, y_m, X_b, y_b])
# OpenBLAS is known to segfault with unaligned data on the Prescott architecture
# See: https://github.com/scipy/scipy/issues/14886
has_prescott_openblas = any(
True
for info in threadpool_info()
if info["internal_api"] == "openblas"
# Prudently assume Prescott might be the architecture if it is unknown.
and info.get("architecture", "prescott").lower() == "prescott"
)

X_m, y_m, X_b, y_b = create_memmap_backed_data(
data=[X_m, y_m, X_b, y_b], aligned=has_prescott_openblas
)

problems = [(X_b, y_b)]
tags = _safe_tags(classifier_orig)
Expand Down