diff options
author | Efraim Flashner <[email protected]> | 2023-12-10 13:25:47 +0200 |
---|---|---|
committer | Efraim Flashner <[email protected]> | 2023-12-10 13:25:47 +0200 |
commit | 34eaf5714efcb847c9cba03a055a17e790c1d017 (patch) | |
tree | d9c534cac0e668052e6b3c5b11602d0773aa5068 /gnu/packages/machine-learning.scm | |
parent | 99f7f6457485d524c560bce428fb8c3997e2b553 (diff) | |
parent | 63e06f30ce20fa846a7e2e814976fefcd9eda7d3 (diff) |
Merge remote-tracking branch 'origin/master' into rust-team
Change-Id: Ic45f7071abd6a02c2ccad411500e5103c8272ffb
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 7d833005bc..c100e0be6e 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1532,6 +1532,54 @@ computing environments.") data analysis.") (license license:bsd-3))) +(define-public python-scikit-learn-extra + (package + (name "python-scikit-learn-extra") + (version "0.3.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/scikit-learn-contrib/scikit-learn-extra") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0yy6ka94ss88f3r7b6mpjf1l8lnv7aabhsg844pigfj8lfiv0wvl")))) + (build-system pyproject-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (add-after 'build 'build-ext + (lambda _ + (invoke "python" "setup.py" "build_ext" + "--inplace"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + ;; Restrict OpenBLAS threads to prevent segfaults while testing! + (setenv "OPENBLAS_NUM_THREADS" "1") + + ;; Some tests require write access to $HOME. + (setenv "HOME" "/tmp") + + ;; Step out of the source directory to avoid interference; + ;; we want to run the installed code with extensions etc. + (with-directory-excursion "/tmp" + (invoke "pytest" "-vv" "--pyargs" + "sklearn_extra" + ;; ignore tests that require network + "-k" "not test_build")))))))) + (propagated-inputs (list python-numpy python-scikit-learn python-scipy)) + (native-inputs (list python-pytest python-pytest-cov python-cython)) + (home-page "https://github.com/scikit-learn-contrib/scikit-learn-extra") + (synopsis "Set of tools for scikit-learn") + (description + "This package provides a Python module for machine learning that extends +scikit-learn. It includes algorithms that are useful but do not satisfy the +scikit-learn inclusion criteria, for instance due to their novelty or lower +citation number.") + (license license:bsd-3))) + (define-public python-thinc (package (name "python-thinc") @@ -1920,9 +1968,9 @@ Covariance Matrix Adaptation Evolution Strategy (CMA-ES) for Python.") (license license:expat))) (define-public python-autograd - (let* ((commit "442205dfefe407beffb33550846434baa90c4de7") + (let* ((commit "c6d81ce7eede6db801d4e9a92b27ec5d409d0eab") (revision "0") - (version (git-version "0.0.0" revision commit))) + (version (git-version "1.5" revision commit))) (package (name "python-autograd") (home-page "https://github.com/HIPS/autograd") @@ -1933,19 +1981,14 @@ Covariance Matrix Adaptation Evolution Strategy (CMA-ES) for Python.") (commit commit))) (sha256 (base32 - "189sv2xb0mwnjawa9z7mrgdglc1miaq93pnck26r28fi1jdwg0z4")) + "04kljgydng42xlg044h6nbzxpban1ivd6jzb8ydkngfq88ppipfk")) (file-name (git-file-name name version)))) (version version) - (build-system python-build-system) + (build-system pyproject-build-system) (native-inputs (list python-nose python-pytest)) (propagated-inputs (list python-future python-numpy)) - (arguments - `(#:phases (modify-phases %standard-phases - (replace 'check - (lambda _ - (invoke "py.test" "-v")))))) (synopsis "Efficiently computes derivatives of NumPy code") (description "Autograd can automatically differentiate native Python and NumPy code. It can handle a large subset of Python's features, including loops, |