[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
154/166: gnu: python-scikit-learn: Parallelize build and test suite.
From: |
guix-commits |
Subject: |
154/166: gnu: python-scikit-learn: Parallelize build and test suite. |
Date: |
Tue, 19 Apr 2022 09:18:13 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython+polyglossia
in repository guix.
commit 8427beed43079ca3783aac741a147e4761981c88
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/")
- 140/166: gnu: python-sqlalchemy: Update to 1.4.35., (continued)
- 140/166: gnu: python-sqlalchemy: Update to 1.4.35., guix-commits, 2022/04/19
- 141/166: gnu: Add python-pecan., guix-commits, 2022/04/19
- 142/166: gnu: Add python-aioredis., guix-commits, 2022/04/19
- 143/166: gnu: python-fakeredis: Update to 1.7.1., guix-commits, 2022/04/19
- 144/166: gnu: python-falcon: Update to 3.1.0., guix-commits, 2022/04/19
- 145/166: gnu: Add python-dictpath., guix-commits, 2022/04/19
- 146/166: gnu: Add python-openapi-core., guix-commits, 2022/04/19
- 149/166: gnu: python-numpy: Update to 1.21.6 and parallelize build/tests., guix-commits, 2022/04/19
- 150/166: gnu: python-llvmlite: Update to 0.38.0., guix-commits, 2022/04/19
- 151/166: gnu: python-numba: Update to 0.55.1., guix-commits, 2022/04/19
- 154/166: gnu: python-scikit-learn: Parallelize build and test suite.,
guix-commits <=
- 157/166: gnu: python-jupyter-server: Update to 1.16.0., guix-commits, 2022/04/19
- 163/166: gnu: xeus: Update to 2.4.1., guix-commits, 2022/04/19
- 162/166: gnu: python-jupyter-kernel-mgmt: Update to 0.5.1 and disable tests., guix-commits, 2022/04/19
- 166/166: gnu: python-readme-renderer: Update to 34.0., guix-commits, 2022/04/19
- 148/166: gnu: python-hypothesis-6.23: Update to 6.43.3., guix-commits, 2022/04/19