diff options
Diffstat (limited to 'gnu/packages/machine-learning.scm')
-rw-r--r-- | gnu/packages/machine-learning.scm | 68 |
1 files changed, 58 insertions, 10 deletions
diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 18a4ac9ef2..05646dd770 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org> ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net> ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com> +;;; Copyright © 2020 Vinicius Monego <monego@posteo.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -53,6 +54,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages cmake) #:use-module (gnu packages cran) #:use-module (gnu packages databases) #:use-module (gnu packages dejagnu) @@ -70,6 +72,7 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages protobuf) #:use-module (gnu packages python) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-science) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) @@ -412,14 +415,14 @@ sample proximities between pairs of cases.") (define-public openfst (package (name "openfst") - (version "1.7.2") + (version "1.7.9") (source (origin (method url-fetch) (uri (string-append "http://www.openfst.org/twiki/pub/FST/" "FstDownload/openfst-" version ".tar.gz")) (sha256 (base32 - "0fqgk8195kz21is09gwzwnrg7fr9526bi9mh4apyskapz27pbhr1")))) + "1pmx1yhn2gknj0an0zwqmzgwjaycapi896244np50a8y3nrsw6ck")))) (build-system gnu-build-system) (home-page "http://www.openfst.org") (synopsis "Library for weighted finite-state transducers") @@ -576,6 +579,46 @@ tools. This enables both rapid prototyping of data pipelines and extensibility in terms of new algorithms.") (license license:gpl3+))) +(define-public python-onnx + (package + (name "python-onnx") + (version "1.7.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "onnx" version)) + ;; ONNX will build googletest from a git checkout. Patch CMake + ;; to use googletest from Guix and enable tests by default. + (patches (search-patches "python-onnx-use-system-googletest.patch")) + (sha256 + (base32 "0j6rgfbhsw3a8id8pyg18y93k68lbjbj1kq6qia36h69f6pvlyjy")))) + (build-system python-build-system) + (native-inputs + `(("cmake" ,cmake) + ("googletest" ,googletest) + ("pybind11" ,pybind11) + ("python-coverage" ,python-coverage) + ("python-nbval" ,python-nbval) + ("python-pytest" ,python-pytest) + ("python-pytest-runner" ,python-pytest-runner))) + (inputs + `(("protobuf" ,protobuf))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-protobuf" ,python-protobuf) + ("python-six" ,python-six) + ("python-tabulate" ,python-tabulate) + ("python-typing-extensions" + ,python-typing-extensions))) + (home-page "https://onnx.ai/") + (synopsis "Open Neural Network Exchange") + (description + "Open Neural Network Exchange (ONNX) provides an open source format for +AI models, both deep learning and traditional ML. It defines an extensible +computation graph model, as well as definitions of built-in operators and +standard data types.") + (license license:expat))) + (define-public rxcpp (package (name "rxcpp") @@ -730,7 +773,8 @@ than 8 bits, and at the end only some significant 8 bits are kept.") #t)))) (build-system cmake-build-system) (arguments - `(#:phases + `(#:configure-flags '("-DBUILD_SHARED_LIBS=ON") + #:phases (modify-phases %standard-phases (add-after 'unpack 'disable-asserts (lambda _ @@ -767,12 +811,7 @@ than 8 bits, and at the end only some significant 8 bits are kept.") (with-directory-excursion test-dir (invoke "make" "-j" (number->string (parallel-job-count))) (invoke "./dtest" "--runall")) - #t))) - (add-after 'install 'delete-static-library - (lambda* (#:key outputs #:allow-other-keys) - (delete-file (string-append (assoc-ref outputs "out") - "/lib/libdlib.a")) - #t))))) + #t)))))) (native-inputs `(("pkg-config" ,pkg-config) ;; For tests. @@ -1010,7 +1049,16 @@ the following advantages: (modify-phases %standard-phases (add-after 'unpack 'make-files-writable (lambda _ - (for-each make-file-writable (find-files "." ".*")) #t))))) + (for-each make-file-writable (find-files "." ".*")) #t)) + (add-after 'install 'install-more-headers + (lambda* (#:key outputs #:allow-other-keys) + (for-each + (lambda (file) + (install-file file (string-append + (assoc-ref outputs "out") + "/include/vowpalwabbit"))) + (find-files "vowpalwabbit" "\\.h$")) + #t))))) (build-system gnu-build-system) (home-page "https://github.com/JohnLangford/vowpal_wabbit") (synopsis "Fast machine learning library for online learning") |