M gnu/packages/machine-learning.scm => gnu/packages/machine-learning.scm +43 -0
@@ 2133,6 2133,49 @@ computing environments.")
data analysis.")
(license license:bsd-3)))
+;; 1.7 intorduced breaking changes in API.
+(define-public python-scikit-learn-1.6
+ (package
+ (inherit python-scikit-learn)
+ (name "python-scikit-learn")
+ (version "1.6.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/scikit-learn/scikit-learn")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "08z1b58n31grfvl42wi6rdwrfhrdhnzkkxhg19iag3zkvkcvxqjl"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-scikit-learn)
+ ((#:test-flags flags)
+ #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
+ "-m" "not network"
+ "-k" (string-join
+ (list "not test_ard_accuracy_on_easy_problem"
+ "test_check_inplace_ensure_writeable"
+ "test_check_is_fitted_with_attributes"
+ "test_covariance"
+ "test_estimators"
+ "test_ledoit_wolf"
+ "test_mcd"
+ "test_mcd_issue1127"
+ "test_mcd_support_covariance_is_zero"
+ "test_oas"
+ "test_shrunk_covariance"
+ "test_toy_ard_object")
+ " and not ")))
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (add-after 'unpack 'remove-broken-tests
+ (lambda _
+ ;; ImportError: cannot import name 'ColMajor' from
+ ;; 'sklearn.utils._cython_blas'
+ ;; (<...>/_cython_blas.cpython-311-x86_64-linux-gnu.so)
+ (delete-file-recursively "sklearn/utils/tests/test_cython_blas.py")))))))))
+
(define-public python-scikit-learn-extra
;; This commit fixes an incompatibility with newer versions of scikit-learn
(let ((commit "0f95d8dda4c69f9de4fb002366041adcb1302f3b")