summaryrefslogtreecommitdiff
path: root/gnu/packages/machine-learning.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r--gnu/packages/machine-learning.scm323
1 files changed, 169 insertions, 154 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index 8df3178bd8..d43c5227ff 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -152,7 +152,7 @@
(define-public dlpack
(package
(name "dlpack")
- (version "1.0")
+ (version "1.1")
(source
(origin
(method git-fetch)
@@ -161,10 +161,10 @@
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "169slm88jin4ddhdwk1qhqzzkhkwk1jrz35i7abhcqkry9wjib4f"))))
+ (base32 "0vlp8gcf7s3snalj6xmvgqxxn96fki6gw9hzph30gmgdbaz730j6"))))
(build-system cmake-build-system)
(arguments (list #:tests? #f)) ;No tests.
- (home-page "https://github.com/dmlc/dlpack")
+ (home-page "https://dmlc.github.io/dlpack/latest/")
(synopsis "In memory tensor structure")
(description
"DLPack is an in-memory tensor structure for sharing tensors among
@@ -221,7 +221,7 @@ family of functions.")
(define-public python-faster-whisper
(package
(name "python-faster-whisper")
- (version "1.1.1")
+ (version "1.2.0")
(source
(origin
(method git-fetch)
@@ -230,7 +230,7 @@ family of functions.")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0g9cdvphifn4rqhh7p4z1d3pp6bhcx0jmcahjigvcgry0qsijgfn"))))
+ (base32 "0wmc9aszpnbr60l5v97np0rc3zsz4pldjald7kmnr668rhpakzcj"))))
(build-system pyproject-build-system)
;; XXX: Currently tests requires model download, which we'd rather avoid
;; in Guix unless we're sure about the FOSS weights. To test in source :
@@ -302,30 +302,41 @@ distributions.")
(license license:asl2.0)))
(define-public fann
- ;; The last release is >100 commits behind, so we package from git.
- (let ((commit "d71d54788bee56ba4cf7522801270152da5209d7"))
+ ;; The last release is 14 years old.
+ (let ((commit "1783cbf6239a597c4d29f694e227e22b8d4f4bf6")
+ (revision "2"))
(package
(name "fann")
- (version (string-append "2.2.0-1." (string-take commit 8)))
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/libfann/fann")
- (commit commit)))
- (file-name (string-append name "-" version "-checkout"))
- (sha256
- (base32
- "0ibwpfrjs6q2lijs8slxjgzb2llcl6rk3v2ski4r6215g5jjhg3x"))))
+ (version (git-version "2.2.0" revision commit))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/libfann/fann")
+ (commit commit)))
+ (modules '((guix build utils)))
+ (snippet #~(delete-file-recursively "lib/googletest"))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0jlcxl0czlr3982mak3935mb08i2f368f0jsxca91ppgfd596ldr"))))
(build-system cmake-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out")))
- (with-directory-excursion (string-append (getcwd) "/tests")
- (invoke "./fann_tests"))))))))
- (home-page "http://leenissen.dk/fann/wp/")
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-googletest
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("ADD_SUBDIRECTORY\\( lib/googletest \\)")
+ ""))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (with-directory-excursion "tests"
+ (invoke "./fann_tests"))))))))
+ (native-inputs (list googletest))
+ (home-page "https://leenissen.dk/")
(synopsis "Fast Artificial Neural Network")
(description
"FANN is a neural network library, which implements multilayer
@@ -336,39 +347,40 @@ sparsely connected networks.")
(define-public libsvm
(package
(name "libsvm")
- (version "3.23")
+ (version "336")
(source
(origin
- (method url-fetch)
- (uri (string-append "https://www.csie.ntu.edu.tw/~cjlin/libsvm/"
- name "-" version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/cjlin1/libsvm/")
+ (commit (string-append "v" version))))
(sha256
- (base32 "0jpaq0rr92x38p4nk3gjan79ip67m6p80anb28z1d8601miysyi5"))))
+ (base32 "03ns6frhfdcyl661ws1yqbzsa6m8wrmba544vlacghry2kg88hn2"))))
(build-system gnu-build-system)
(arguments
- `(#:tests? #f ; no "check" target
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-after 'build 'build-lib
- (lambda _
- (invoke "make" "lib")))
- (replace 'install ; no ‘install’ target
- (lambda* (#:key outputs #:allow-other-keys)
- (let* ((out (assoc-ref outputs "out"))
- (bin (string-append out "/bin/"))
- (lib (string-append out "/lib/"))
- (inc (string-append out "/include/libsvm")))
- (mkdir-p bin)
- (for-each (lambda (file)
- (copy-file file (string-append bin file)))
- '("svm-train"
- "svm-predict"
- "svm-scale"))
- (mkdir-p lib)
- (install-file "libsvm.so.2" lib)
- (mkdir-p inc)
- (install-file "svm.h" inc)))))))
+ (list
+ #:tests? #f ;no "check" target
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'build 'build-lib
+ (lambda _
+ (invoke "make" "lib")))
+ (replace 'install
+ ;no "install" target
+ (lambda _
+ (for-each (lambda (file)
+ (install-file file
+ (string-append #$output "/bin")))
+ '("svm-train" "svm-predict" "svm-scale"))
+ (install-file "libsvm.so.4"
+ (string-append #$output "/lib"))
+ (symlink (string-append #$output "/lib/libsvm.so.4")
+ (string-append #$output "/lib/libsvm.so"))
+ (install-file "svm.h"
+ (string-append #$output "/include/"
+ #$name)))))))
+ (native-inputs (list python-minimal-wrapper))
(home-page "https://www.csie.ntu.edu.tw/~cjlin/libsvm/")
(synopsis "Library for Support Vector Machines")
(description
@@ -427,35 +439,20 @@ machine learning algorithms based on GPs.")
(license license:bsd-3)))
(define-public python-libsvm
- (package (inherit libsvm)
+ (package
+ (inherit libsvm)
(name "python-libsvm")
- (build-system gnu-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #f ; no "check" target
- #:make-flags '("-C" "python")
- #:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (replace
- 'install ; no ‘install’ target
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((site (string-append (assoc-ref outputs "out")
- "/lib/python"
- (string-take
- (string-take-right
- (assoc-ref inputs "python") 5) 3)
- "/site-packages/")))
- (substitute* "python/svm.py"
- (("../libsvm.so.2") "libsvm.so.2"))
- (mkdir-p site)
- (for-each (lambda (file)
- (copy-file file (string-append site (basename file))))
- (find-files "python" "\\.py"))
- (copy-file "libsvm.so.2"
- (string-append site "libsvm.so.2")))
- #t)))))
- (inputs
- (list python))
+ (list
+ #:tests? #f ;no "check" target
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'chdir
+ (lambda _
+ (chdir "python"))))))
+ (native-inputs (list python-setuptools python-wheel))
+ (propagated-inputs (list libsvm python-scipy))
(synopsis "Python bindings of libSVM")))
(define-public python-mcfit
@@ -979,16 +976,17 @@ algorithm.")
(define-public openmm
(package
(name "openmm")
- (version "8.1.1")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/openmm/openmm")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "064vv6zaci30pj38z5lwfqscxssm67jqxkz30hcya9vm4ng831d5"))))
+ (version "8.3.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openmm/openmm")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0pcy1f6r4h6z0b75gx4lcnkf7yr8342w2dch7jml1ycmzpqkxvfx"))))
(build-system cmake-build-system)
(arguments
(list
@@ -1141,16 +1139,17 @@ optimizing, and searching weighted finite-state transducers (FSTs).")
(define-public sentencepiece
(package
(name "sentencepiece")
- (version "0.1.97")
+ (version "0.2.1")
(source
(origin
(method git-fetch)
- (uri (git-reference
- (url "https://github.com/google/sentencepiece")
- (commit (string-append "v" version))))
+ (uri
+ (git-reference
+ (url "https://github.com/google/sentencepiece/")
+ (commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "1kzfkp2pk0vabyw3wmkh16h11chzq63mzc20ddhsag5fp6s91ajg"))))
+ (base32 "1yzsaam3kk9fqzxfc3nm2pskwq1bdgkrijmcmzmg5x0338rn0hmb"))))
(build-system cmake-build-system)
(arguments (list #:tests? #f)) ;no tests
(native-inputs (list gperftools))
@@ -1194,23 +1193,24 @@ cardinality matching from a bipartite graph.")
(define-public python-persim
(package
(name "python-persim")
- (version "0.3.2")
+ (version "0.3.8")
(source
(origin
(method url-fetch)
(uri (pypi-uri "persim" version))
(sha256
- (base32 "0q8wfakx8q4h3ryvw8cba0v6z7xn9139qkrzs3mi1ggyzacnx9d7"))))
+ (base32 "03d4kgakpgj54c3pl9dkqrkbmj6w13gmczkds5jagf3n85c1hgg1"))))
(build-system pyproject-build-system)
- (propagated-inputs (list python-deprecated
- python-hopcroftkarp
- python-joblib
- python-matplotlib
- python-numpy
- python-scikit-learn
- python-scipy))
- (native-inputs (list python-pytest python-pytest-cov python-setuptools
- python-wheel))
+ (native-inputs
+ (list python-pytest python-setuptools-next))
+ (propagated-inputs
+ (list python-deprecated
+ python-hopcroftkarp
+ python-joblib
+ python-matplotlib
+ python-numpy
+ python-scikit-learn
+ python-scipy))
(home-page "https://persim.scikit-tda.org")
(synopsis "Tools for analyzing persistence diagrams in Python")
(description
@@ -1456,22 +1456,21 @@ storing tensors safely.")
(define-public python-sentencepiece
(package
+ (inherit sentencepiece)
(name "python-sentencepiece")
- (version "0.1.97")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "sentencepiece" version))
- (sha256
- (base32 "0v0z9ryl66432zajp099bcbnwkkldzlpjvgnjv9bq2vi19g300f9"))))
(build-system python-build-system)
- (native-inputs (list pkg-config))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir
+ (lambda _
+ (chdir "python"))))))
+ (native-inputs (list pkg-config protobuf))
(propagated-inputs (list sentencepiece))
- (home-page "https://github.com/google/sentencepiece")
(synopsis "SentencePiece python wrapper")
(description "This package provides a Python wrapper for the SentencePiece
-unsupervised text tokenizer.")
- (license license:asl2.0)))
+unsupervised text tokenizer.")))
(define-public python-sentence-transformers
(package
@@ -3892,7 +3891,6 @@ advanced research.")
(build-system cmake-build-system)
(arguments
(list
- #:tests? #false ;tests are not building now
#:build-type "Release"
#:modules '((ice-9 match)
(guix build utils)
@@ -3908,6 +3906,7 @@ advanced research.")
"-DTFLITE_ENABLE_GPU=ON"
"-DTFLITE_ENABLE_RUY=ON"
+ "-DTFLITE_ENABLE_XNNPACK=ON"
;; TODO: turn on Farmhash
;;"-DSYSTEM_FARMHASH=ON"
@@ -3925,11 +3924,6 @@ advanced research.")
(string-append "-Druy_DIR=" #$(this-package-input "ruy")
"/lib/cmake/ruy")
- ;; TODO: The build system attempts to build xnnpack from source. We
- ;; would like to use our xnnpack package here, but this requires more
- ;; work.
- "-DTFLITE_ENABLE_XNNPACK=OFF"
-
;; Don't fetch the sources. We have these already
"-Dgemmlowp_POPULATED=TRUE"
"-Degl_headers_POPULATED=TRUE"
@@ -3941,6 +3935,7 @@ advanced research.")
"-Dgoogle_benchmark_POPULATED=TRUE"
"-Dnsync_POPULATED=TRUE"
"-Dre2_POPULATED=TRUE"
+ "-Dxnnpack_POPULATED=TRUE"
"-DFFT2D_SOURCE_DIR=/tmp/fft2d"
"-DFARMHASH_SOURCE_DIR=/tmp/farmhash"
@@ -3975,6 +3970,21 @@ advanced research.")
(with-directory-excursion "/tmp/fft2d"
(invoke "tar" "--strip-components=1"
"-xf" (assoc-ref inputs "fft2d-src")))))
+ (add-after 'copy-sources 'opencl-fix
+ (lambda _ (substitute* "delegates/gpu/cl/opencl_wrapper.h"
+ (("cl_ndrange_kernel_command_properties_khr")
+ "cl_command_properties_khr"))))
+ (add-after 'opencl-fix 'absl-fix
+ (lambda _ (substitute* '(
+ "delegates/gpu/cl/cl_operation.h"
+ "delegates/gpu/common/task/qcom_thin_filter_desc.cc"
+ "delegates/gpu/common/tasks/special/thin_pointwise_fuser.cc")
+ (("#include <vector>")
+ "#include <vector>\n\n#include \"absl/strings/str_cat.h\"\n"))))
+ (add-after 'opencl-fix 'stdint-fix
+ (lambda _ (substitute* "kernels/internal/spectrogram.cc"
+ (("#include <math.h>")
+ "#include <math.h>\n#include <cstdint>\n"))))
(add-after 'build 'build-shared-library
(lambda* (#:key configure-flags #:allow-other-keys)
(mkdir-p "c")
@@ -3999,7 +4009,7 @@ advanced research.")
(when tests?
(invoke "ctest" "-L" "plain")))))))
(inputs
- `(("abseil-cpp" ,abseil-cpp-20200923.3)
+ `(("abseil-cpp" ,abseil-cpp)
("cpuinfo" ,cpuinfo)
("eigen" ,eigen)
("fp16" ,fp16)
@@ -4015,7 +4025,7 @@ advanced research.")
("python" ,python)
("ruy" ,ruy)
("re2" ,re2)
- ;;("xnnpack" ,xnnpack) ; TODO: use Guix's copy of xnnpack
+ ("xnnpack" ,xnnpack)
("vulkan-headers" ,vulkan-headers)))
(native-inputs
`(("pkg-config" ,pkg-config)
@@ -4064,11 +4074,10 @@ devices.")
(base32 "1x4ad1jhn84fywlk031fmv1kxyiscclmrqn9hhj8gz0mh7z9vcrh"))))
(build-system cmake-build-system)
(arguments
- `(#:configure-flags
- (list "-DGOOGLE_TEST=ON")))
+ (list
+ #:configure-flags #~(list "-DGOOGLE_TEST=ON")))
(native-inputs
- `(("googletest" ,googletest)
- ("python" ,python-wrapper)))
+ (list googletest python-wrapper))
(home-page "https://github.com/dmlc/dmlc-core")
(synopsis "Common bricks library for machine learning")
(description
@@ -4297,7 +4306,7 @@ methodxs at scale on CPU or GPU.")
(define-public python-umap-learn
(package
(name "python-umap-learn")
- (version "0.5.8")
+ (version "0.5.9")
(source
(origin
(method git-fetch) ;no tests in pypi release
@@ -4306,7 +4315,7 @@ methodxs at scale on CPU or GPU.")
(commit (string-append "release-" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0pdlb6qn9vnvabksiabxmcj30j8ff7526mz1qszrbdl5kh2sl7sm"))))
+ (base32 "0pkniia9lccdbshwl4sh2iria7dny13qk0flkk67msb777sm5bmn"))))
(build-system pyproject-build-system)
(arguments
(list
@@ -5596,24 +5605,23 @@ as torchvision, torchtext, and others.")
(define-public python-readchar
(package
(name "python-readchar")
- (version "4.0.5")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "readchar" version))
- (sha256
- (base32
- "09n8vl2jjbnbnrzfvkynijrnwrqvc91bb2267zg8r261sz15d908"))))
+ (version "4.2.1")
+ (source
+ (origin
+ ;; There is no tests data in PyPI archive.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/magmax/python-readchar/")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "16ypci664l54ka6ickwkpaa2id14h9h00y7z24z0bv0szld4mrxg"))))
(build-system pyproject-build-system)
- (arguments
- (list
- #:phases
- '(modify-phases %standard-phases
- ;; This one file requires the msvcrt module, which we don't have.
- (add-after 'unpack 'delete-windows-file
- (lambda _
- (delete-file "readchar/_win_read.py"))))))
- (propagated-inputs (list python-setuptools))
- (native-inputs (list python-wheel))
+ (native-inputs
+ (list python-pytest
+ python-pytest-cov
+ python-setuptools-next))
(home-page "https://github.com/magmax/python-readchar")
(synopsis "Library to easily read single chars and key strokes")
(description "This package provides a Python library to easily read single
@@ -6423,7 +6431,7 @@ linear algebra routines needed for structured matrices (or operators).")
(define-public python-botorch
(package
(name "python-botorch")
- (version "0.14.0")
+ (version "0.15.1")
(source (origin
(method git-fetch) ;no tests in PyPI
(uri (git-reference
@@ -6432,10 +6440,17 @@ linear algebra routines needed for structured matrices (or operators).")
(file-name (git-file-name name version))
(sha256
(base32
- "1hgjjzdqcs8y0z20vkdzzpbm0nvnxmrav4mfvbpp0gny8pk64913"))))
+ "1c6p5h5gypiyj59820q2w3k7rx715r3vxxcr5mnwdjbhi4l2q47a"))))
(build-system pyproject-build-system)
(arguments
- (list #:test-flags #~(list "-k" "not test_all_cases_covered")
+ ;; 7 failed, 1502 passed, 1 skipped, 1 deselected, 807 warnings
+ (list #:test-flags #~(list "-k"
+ (string-append
+ "not test_all_cases_covered"
+ " and not test_input_constructors"
+ " and not test_gen"
+ " and not test_mock"
+ " and not test_evaluation"))
#:phases
#~(modify-phases %standard-phases
(add-before 'build 'pretend-version
@@ -6582,8 +6597,8 @@ simple speech recognition.")
"lib.")))))))))
(define-public nerd-dictation
- (let* ((commit "0eb44b7fd0927d69c92de5566e5807ed2c2e20b7")
- (revision "1"))
+ (let* ((commit "03ce043a6d569a5bb9a715be6a8e45d8ba0930fd")
+ (revision "2"))
(package
(name "nerd-dictation")
(version (git-version "0" revision commit))
@@ -6595,7 +6610,7 @@ simple speech recognition.")
(commit commit)))
(file-name (git-file-name name version))
(sha256
- (base32 "0frdpswv6w3cwj3c7wd5w8gj3s1hvpdwd48qhfhfxf7imahz9bqf"))))
+ (base32 "0ksnlpy2jcldxamq7bsbcgxgafcmgxkbjccd4fwmmn0y814kkz9k"))))
(build-system pyproject-build-system)
(arguments
(list