diff options
author | Marius Bakke <mbakke@fastmail.com> | 2018-11-22 01:47:36 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2018-11-22 17:02:47 +0100 |
commit | 7ff3f3d22caaf03948a60ae691313db28f4fab06 (patch) | |
tree | 5428e6edf032a454c37b8aad1cb6e684c4b80b3c /gnu/packages/machine-learning.scm | |
parent | ec8130eb23b79c2b8b61043f25dafcefd0daafe7 (diff) | |
download | patches-7ff3f3d22caaf03948a60ae691313db28f4fab06.tar patches-7ff3f3d22caaf03948a60ae691313db28f4fab06.tar.gz |
gnu: python-scikit-learn: Update to 0.20.1.
* gnu/packages/patches/python-scikit-learn-fix-test-non-determinism.patch:
Delete file.
* gnu/local.mk (dist_patch_DATA): Remove it.
* gnu/packages/machine-learning.scm (python-scikit-learn): Update to 0.20.1.
[source](patches): Remove.
[arguments]: Skip network tests with pytest instead of deleting files. Make
sure $HOME is writable.
(python2-scikit-learn): Rewrite in terms of PACKAGE-WITH-PYTHON2.
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 09c525ff20..4b2447ece0 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -706,7 +706,7 @@ computing environments.") (define-public python-scikit-learn (package (name "python-scikit-learn") - (version "0.19.2") + (version "0.20.1") (source (origin (method git-fetch) @@ -716,9 +716,7 @@ computing environments.") (file-name (git-file-name name version)) (sha256 (base32 - "1dk9hdj01c0bny4ps78b7869fjw9gr6qklxf6wyql8h6nh4k19xm")) - (patches (search-patches - "python-scikit-learn-fix-test-non-determinism.patch")))) + "0qv7ir1fy9vjar3llc72yxmfja3gxm5icdf0y3q57vsn3wcdglkz")))) (build-system python-build-system) (arguments `(#:phases @@ -729,11 +727,11 @@ computing environments.") (lambda _ ;; Restrict OpenBLAS threads to prevent segfaults while testing! (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t)) + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + (invoke "pytest" "sklearn" "-m" "not network"))) ;; FIXME: This fails with permission denied (delete 'reset-gzip-timestamps)))) (inputs @@ -753,24 +751,7 @@ data analysis.") (license license:bsd-3))) (define-public python2-scikit-learn - (let ((parent (package-with-python2 python-scikit-learn))) - (package (inherit parent) - (arguments - (substitute-keyword-arguments (package-arguments parent) - ((#:phases phases) - `(modify-phases ,phases - (replace 'check - (lambda _ - ;; Restrict OpenBLAS threads to prevent segfaults while testing! - (setenv "OPENBLAS_NUM_THREADS" "1") - ;; Some tests expect to be able to write to HOME. - (setenv "HOME" "/tmp") - ;; Disable tests that require network access - (delete-file "sklearn/datasets/tests/test_kddcup99.py") - (delete-file "sklearn/datasets/tests/test_mldata.py") - (delete-file "sklearn/datasets/tests/test_rcv1.py") - (invoke "pytest" "sklearn") - #t))))))))) + (package-with-python2 python-scikit-learn)) (define-public python-autograd (let* ((commit "442205dfefe407beffb33550846434baa90c4de7") |