aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-01-10 11:22:58 +0100
committerRicardo Wurmus <rekado@elephly.net>2024-01-16 12:44:36 +0100
commit998df6e047478c00773a452989bb8a5cec12306d (patch)
tree1b2439e4ad7760a9bec5f9e6edd05286a6b23d1a
parent50dbb9561f20ff47bee845d5c36837ae653e9875 (diff)
downloadguix-998df6e047478c00773a452989bb8a5cec12306d.tar.gz
guix-998df6e047478c00773a452989bb8a5cec12306d.zip
gnu: python-scikit-optimize: Make compatible with latest sklearn.
* gnu/packages/python-science.scm (python-scikit-optimize)[source]: Add snippet to fix outdated use of "max_features" option. Change-Id: I4272ffc82b4951315b74b4adee27527e8d513fca
-rw-r--r--gnu/packages/python-science.scm10
1 files changed, 9 insertions, 1 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index e305a727c6..c2388f9eb6 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -335,7 +335,15 @@ logic, also known as grey logic.")
;; These are for compatibility with more recent versions of
;; numpy and scikit-learn.
(search-patches "python-scikit-optimize-1148.patch"
- "python-scikit-optimize-1150.patch"))))
+ "python-scikit-optimize-1150.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ ;; Since scikit-learn 1.3 max_features no longer supports
+ ;; 'auto', which is identical to 'sqrt'
+ '(substitute* '("skopt/learning/forest.py"
+ "skopt/learning/tests/test_forest.py")
+ (("max_features=['\"]auto['\"]")
+ "max_features='sqrt'")))))
(build-system pyproject-build-system)
(propagated-inputs
(list python-joblib