[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
160/232: gnu: python-scikit-learn: Parallelize build and test suite.
From: |
guix-commits |
Subject: |
160/232: gnu: python-scikit-learn: Parallelize build and test suite. |
Date: |
Sun, 24 Apr 2022 23:59:06 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython-polyglossia
in repository guix.
commit a5d256fc89adb318bd1f875db175549ff5cab490
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 18 17:23:40 2022 -0400
gnu: python-scikit-learn: Parallelize build and test suite.
* gnu/packages/machine-learning.scm (python-scikit-learn)
[phases]{configure}: New phase.
{build-ext}: Add '-j' option.
{check}: Add '-n' option.
[native-inputs]: Add python-pytest-xdist.
---
gnu/packages/machine-learning.scm | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/machine-learning.scm
b/gnu/packages/machine-learning.scm
index 7f082ee677..b765257d98 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -16,7 +16,7 @@
;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
-;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1095,8 +1095,13 @@ computing environments.")
(arguments
`(#:phases
(modify-phases %standard-phases
+ (add-before 'build 'configure
+ (lambda _
+ (setenv "SKLEARN_BUILD_PARALLEL"
+ (number->string (parallel-job-count)))))
(add-after 'build 'build-ext
- (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace")))
+ (lambda _ (invoke "python" "setup.py" "build_ext" "--inplace"
+ "-j" (number->string (parallel-job-count)))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -1107,13 +1112,15 @@ computing environments.")
(setenv "HOME" "/tmp")
(invoke "pytest" "sklearn" "-m" "not network"
+ "-n" (number->string (parallel-job-count))
;; This test tries to access the internet.
"-k" "not test_load_boston_alternative")))))))
- (inputs
- (list openblas))
+ (inputs (list openblas))
(native-inputs
- (list python-pytest python-pandas ;for tests
- python-cython))
+ (list python-cython
+ python-pandas
+ python-pytest
+ python-pytest-xdist))
(propagated-inputs
(list python-numpy python-threadpoolctl python-scipy python-joblib))
(home-page "https://scikit-learn.org/")
- 137/232: gnu: Add python-openapi-spec-validator., (continued)
- 137/232: gnu: Add python-openapi-spec-validator., guix-commits, 2022/04/24
- 147/232: gnu: Add python-pecan., guix-commits, 2022/04/24
- 142/232: gnu: python-httpx: Update to 0.22.0., guix-commits, 2022/04/24
- 143/232: gnu: python-uvicorn: Update to 0.17.6., guix-commits, 2022/04/24
- 149/232: gnu: python-fakeredis: Update to 1.7.1., guix-commits, 2022/04/24
- 152/232: gnu: Add python-openapi-core., guix-commits, 2022/04/24
- 153/232: gnu: Add python-jupyterlab-server., guix-commits, 2022/04/24
- 156/232: gnu: python-llvmlite: Update to 0.38.0., guix-commits, 2022/04/24
- 158/232: gnu: python-pandas: Build and run tests in parallel., guix-commits, 2022/04/24
- 159/232: gnu: python-pandas: Update to 1.4.2., guix-commits, 2022/04/24
- 160/232: gnu: python-scikit-learn: Parallelize build and test suite.,
guix-commits <=
- 164/232: gnu: python-voila: Update to 0.3.5., guix-commits, 2022/04/24
- 162/232: gnu: python-umap-learn: Update to 0.5.3., guix-commits, 2022/04/24
- 170/232: gnu: python-types-dataclasses: Fix typo., guix-commits, 2022/04/24
- 172/232: gnu: python-readme-renderer: Update to 34.0., guix-commits, 2022/04/24
- 173/232: gnu: mbed-tools: Update to 7.53.0 and relax click version requirement., guix-commits, 2022/04/24
- 167/232: gnu: python-jupyter-protocol: Update to 0.2.0., guix-commits, 2022/04/24
- 177/232: gnu: python-can: Update to 4.0.0., guix-commits, 2022/04/24
- 191/232: gnu: Add python-crccheck., guix-commits, 2022/04/24
- 198/232: gnu: Add python-pydyf., guix-commits, 2022/04/24
- 206/232: gnu: Remove python2-keyring., guix-commits, 2022/04/24