diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-06-16 15:39:21 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-08-08 23:02:15 +0100 |
| commit | 854b35d8fafadb75c56d8a7354cca29f5f14a445 (patch) | |
| tree | d1e750b56e1d3a0fc4d8213174e6d8339ed278dc /gnu | |
| parent | fb0b626d3c68a415a45de126fa51d3fa5372eb74 (diff) | |
gnu: python-scikit-learn: Update to 1.9.0.
* gnu/packages/machine-learning.scm (python-scikit-learn): Update to 1.9.0.
[propagated-inputs]: Add python-narwhals-minimal.
[arguments] <test-flags>: Provide option to run tests from installed
package.
[phases]{check}: Do not overwite and use default phase.
{pre-check}: New phase.
Change-Id: Iaae16b1967622ed2fe9ba8e698b115276f926eba
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/machine-learning.scm | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index c4250b8e33d..f022353eecd 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm | |||
| @@ -2618,7 +2618,7 @@ performance computing environments.") | |||
| 2618 | (define-public python-scikit-learn | 2618 | (define-public python-scikit-learn |
| 2619 | (package | 2619 | (package |
| 2620 | (name "python-scikit-learn") | 2620 | (name "python-scikit-learn") |
| 2621 | (version "1.7.2") | 2621 | (version "1.9.0") |
| 2622 | (source | 2622 | (source |
| 2623 | (origin | 2623 | (origin |
| 2624 | (method git-fetch) | 2624 | (method git-fetch) |
| @@ -2627,14 +2627,15 @@ performance computing environments.") | |||
| 2627 | (commit version))) | 2627 | (commit version))) |
| 2628 | (file-name (git-file-name name version)) | 2628 | (file-name (git-file-name name version)) |
| 2629 | (sha256 | 2629 | (sha256 |
| 2630 | (base32 "11lrlw8bm6f8r67043v2gc4wfpgiyvzp8ya6sds5858ddizjjxs3")))) | 2630 | (base32 "0ay9zqlv1gimi6smxxjf29rvq3d923hdp34x731gd57rvbf22h3p")))) |
| 2631 | (build-system pyproject-build-system) | 2631 | (build-system pyproject-build-system) |
| 2632 | (arguments | 2632 | (arguments |
| 2633 | (list | 2633 | (list |
| 2634 | ;; tests: 34005 passed, 4844 skipped, 150 xfailed, 65 xpassed, 4545 warnings | 2634 | ;; tests: 35838 passed, 11167 skipped, 226 xfailed, 119 xpassed, 5155 warnings |
| 2635 | #:test-flags | 2635 | #:test-flags |
| 2636 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) | 2636 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 2637 | "-m" "not network") | 2637 | "-m" "not network" |
| 2638 | "--pyargs" "sklearn") | ||
| 2638 | #:phases | 2639 | #:phases |
| 2639 | #~(modify-phases %standard-phases | 2640 | #~(modify-phases %standard-phases |
| 2640 | (add-after 'unpack 'patch-pyproject | 2641 | (add-after 'unpack 'patch-pyproject |
| @@ -2646,18 +2647,14 @@ performance computing environments.") | |||
| 2646 | (lambda _ | 2647 | (lambda _ |
| 2647 | (setenv "SKLEARN_BUILD_PARALLEL" | 2648 | (setenv "SKLEARN_BUILD_PARALLEL" |
| 2648 | (number->string (parallel-job-count))))) | 2649 | (number->string (parallel-job-count))))) |
| 2649 | (replace 'check | 2650 | (add-before 'check 'pre-check |
| 2650 | (lambda* (#:key tests? test-flags #:allow-other-keys) | 2651 | (lambda _ |
| 2651 | (when tests? | ||
| 2652 | ;; Restrict OpenBLAS threads to prevent segfaults while | 2652 | ;; Restrict OpenBLAS threads to prevent segfaults while |
| 2653 | ;; testing! | 2653 | ;; testing! |
| 2654 | (setenv "OPENBLAS_NUM_THREADS" "1") | 2654 | (setenv "OPENBLAS_NUM_THREADS" "1") |
| 2655 | ;; Some tests require write access to $HOME. | 2655 | ;; Some tests require write access to $HOME. |
| 2656 | (setenv "HOME" "/tmp") | 2656 | (setenv "HOME" "/tmp") |
| 2657 | ;; Step out of the source directory to avoid interference; we | 2657 | (delete-file-recursively "sklearn")))))) |
| 2658 | ;; want to run the installed code with extensions etc. | ||
| 2659 | (with-directory-excursion "/tmp" | ||
| 2660 | (apply invoke "pytest" "--pyargs" "sklearn" test-flags)))))))) | ||
| 2661 | (inputs | 2658 | (inputs |
| 2662 | (list openblas)) | 2659 | (list openblas)) |
| 2663 | (native-inputs | 2660 | (native-inputs |
| @@ -2668,6 +2665,7 @@ performance computing environments.") | |||
| 2668 | python-pytest-xdist)) | 2665 | python-pytest-xdist)) |
| 2669 | (propagated-inputs | 2666 | (propagated-inputs |
| 2670 | (list python-joblib | 2667 | (list python-joblib |
| 2668 | python-narwhals-minimal ;to reduce closure size | ||
| 2671 | python-numpy | 2669 | python-numpy |
| 2672 | python-scipy | 2670 | python-scipy |
| 2673 | python-threadpoolctl)) | 2671 | python-threadpoolctl)) |
