[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
154/204: gnu: python-scikit-learn: Parallelize build and test suite.
From: |
guix-commits |
Subject: |
154/204: gnu: python-scikit-learn: Parallelize build and test suite. |
Date: |
Wed, 20 Apr 2022 02:03:39 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython-polyglossia
in repository guix.
commit 17fc8a6a8bf6ce98763845b98aa0838fbe1c728e
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/")
- 184/204: gnu: python-mkdocs: Update to 1.3.0., (continued)
- 184/204: gnu: python-mkdocs: Update to 1.3.0., guix-commits, 2022/04/20
- 200/204: gnu: Remove python2-keyring., guix-commits, 2022/04/20
- 201/204: gnu: python-pingouin: Update to 0.5.1., guix-commits, 2022/04/20
- 82/204: gnu: Add python-ufolib2., guix-commits, 2022/04/20
- 122/204: gnu: Add python-sphinx-theme-builder., guix-commits, 2022/04/20
- 125/204: gnu: texlive-polyglossia: Rename and fix package., guix-commits, 2022/04/20
- 127/204: gnu: python-websockets: Update to 10.3 and enable tests., guix-commits, 2022/04/20
- 131/204: gnu: Add python-openapi-spec-validator., guix-commits, 2022/04/20
- 138/204: gnu: Add python-socksio., guix-commits, 2022/04/20
- 151/204: gnu: python-numba: Update to 0.55.1., guix-commits, 2022/04/20
- 154/204: gnu: python-scikit-learn: Parallelize build and test suite.,
guix-commits <=
- 160/204: gnu: python-sparqlkernel: Use gexps and fix inputs., guix-commits, 2022/04/20
- 162/204: gnu: python-jupyter-kernel-mgmt: Update to 0.5.1 and disable tests., guix-commits, 2022/04/20
- 163/204: gnu: xeus: Update to 2.4.1., guix-commits, 2022/04/20
- 168/204: gnu: conan: Update to 1.47.0 and relax PyYAML requirement., guix-commits, 2022/04/20
- 172/204: gnu: python-amqp: Update to 5.1.1 and enable tests., guix-commits, 2022/04/20
- 173/204: gnu: python-kombu: Update to 5.2.4., guix-commits, 2022/04/20
- 179/204: gnu: python-multipart: Fix build with PyYAML 6., guix-commits, 2022/04/20
- 182/204: gnu: python-ghp-import: Update to 2.0.2., guix-commits, 2022/04/20
- 185/204: gnu: Add python-crccheck., guix-commits, 2022/04/20
- 186/204: gnu: python-cantools: Update to 37.0.7., guix-commits, 2022/04/20