mirror of
git://git.savannah.gnu.org/guix.git
synced 2023-12-14 03:33:07 +01:00
gnu: python2-scikit-learn: Fix check phase.
* gnu/packages/machine-learning.scm (python2-scikit-learn)[arguments]: Override check phase to disable broken tests and pass environment variables.
This commit is contained in:
parent
26358ac5ab
commit
391fc11f0e
1 changed files with 18 additions and 1 deletions
|
@ -750,7 +750,24 @@ data analysis.")
|
|||
(license license:bsd-3)))
|
||||
|
||||
(define-public python2-scikit-learn
|
||||
(package-with-python2 python-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)))))))))
|
||||
|
||||
(define-public python-autograd
|
||||
(let* ((commit "442205dfefe407beffb33550846434baa90c4de7")
|
||||
|
|
Loading…
Reference in a new issue