[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
160/242: gnu: python-scikit-learn: Parallelize build and test suite.
From: |
guix-commits |
Subject: |
160/242: gnu: python-scikit-learn: Parallelize build and test suite. |
Date: |
Thu, 12 May 2022 14:14:24 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit 1d1f44b7099a745028a4d99d623c709ab004524b
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/")
- 130/242: gnu: Add texlive-cm-lgc., (continued)
- 130/242: gnu: Add texlive-cm-lgc., guix-commits, 2022/05/12
- 137/242: gnu: Add python-openapi-spec-validator., guix-commits, 2022/05/12
- 139/242: gnu: python-httpcore: Update to 0.14.7 and enable tests., guix-commits, 2022/05/12
- 140/242: gnu: Add python-httpcore-bootstrap., guix-commits, 2022/05/12
- 141/242: gnu: Add python-httpx-bootstrap., guix-commits, 2022/05/12
- 143/242: gnu: python-uvicorn: Update to 0.17.6., guix-commits, 2022/05/12
- 145/242: gnu: python-sqlalchemy: Run tests in parallel via xdist., guix-commits, 2022/05/12
- 146/242: gnu: python-sqlalchemy: Update to 1.4.35., guix-commits, 2022/05/12
- 150/242: gnu: python-falcon: Update to 3.1.0., guix-commits, 2022/05/12
- 156/242: gnu: python-llvmlite: Update to 0.38.0., guix-commits, 2022/05/12
- 160/242: gnu: python-scikit-learn: Parallelize build and test suite.,
guix-commits <=
- 162/242: gnu: python-umap-learn: Update to 0.5.3., guix-commits, 2022/05/12
- 167/242: gnu: python-jupyter-protocol: Update to 0.2.0., guix-commits, 2022/05/12
- 174/242: gnu: conan: Update to 1.47.0 and relax PyYAML requirement., guix-commits, 2022/05/12
- 175/242: gnu: python-parse-type: Update to 0.6.0, fixing build., guix-commits, 2022/05/12
- 172/242: gnu: python-readme-renderer: Update to 34.0., guix-commits, 2022/05/12
- 183/242: gnu: Add python-toolrack., guix-commits, 2022/05/12
- 197/242: gnu: Remove python-orator due to being broken and unmaintained., guix-commits, 2022/05/12
- 161/242: gnu: python-pynndescent: Update to 0.5.6., guix-commits, 2022/05/12
- 194/242: gnu: Remove python2-jmespath., guix-commits, 2022/05/12
- 195/242: gnu: python-croniter: Update to 1.3.4., guix-commits, 2022/05/12