Skip to content

Commit 97fc742

Browse files
DavHauJonathan Ringer
authored andcommitted
scikit-learn: disable some tests for darwin
(cherry picked from commit 4af4723)
1 parent ff776b4 commit 97fc742

File tree

1 file changed

+10
-3
lines changed
  • pkgs/development/python-modules/scikit-learn

1 file changed

+10
-3
lines changed

pkgs/development/python-modules/scikit-learn/default.nix

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,25 @@ buildPythonPackage rec {
6969
disabledTests = [
7070
# Skip test_feature_importance_regression - does web fetch
7171
"test_feature_importance_regression"
72+
73+
# failing on macos
74+
"check_regressors_train"
75+
"check_classifiers_train"
76+
"xfail_ignored_in_check_estimator"
7277
];
7378

7479
pytestFlagsArray = [
7580
# verbose build outputs needed to debug hard-to-reproduce hydra failures
7681
"-v"
7782
"--pyargs" "sklearn"
83+
7884
# NuSVC memmap tests causes segmentation faults in certain environments
7985
# (e.g. Hydra Darwin machines) related to a long-standing joblib issue
8086
# (https://github.com/joblib/joblib/issues/563). See also:
8187
# https://github.com/scikit-learn/scikit-learn/issues/17582
82-
"-k 'not (NuSVC and memmap)'"
83-
] ++ lib.optionals (!stdenv.isDarwin) [
88+
# Since we are overriding '-k' we need to include the 'disabledTests' from above manually.
89+
"-k" "'not (NuSVC and memmap) ${toString (lib.forEach disabledTests (t: "and not ${t}"))}'"
90+
8491
"-n" "$NIX_BUILD_CORES"
8592
];
8693

@@ -102,6 +109,6 @@ buildPythonPackage rec {
102109
"https://scikit-learn.org/stable/whats_new/v${major}.${minor}.html#version-${dashVer}";
103110
homepage = "https://scikit-learn.org";
104111
license = licenses.bsd3;
105-
maintainers = with maintainers; [ ];
112+
maintainers = with maintainers; [ davhau ];
106113
};
107114
}

0 commit comments

Comments
 (0)