;;; 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.
;;;
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix svn-download)
- #:use-module (guix build-system asdf)
#:use-module (guix build-system cmake)
#:use-module (guix build-system gnu)
#:use-module (guix build-system ocaml)
#: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)
#:use-module (gnu packages gstreamer)
#:use-module (gnu packages image)
#:use-module (gnu packages linux)
- #:use-module (gnu packages lisp-xyz)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages ocaml)
#: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)
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/libfann/fann.git")
+ (url "https://github.com/libfann/fann")
(commit commit)))
(file-name (string-append name "-" version "-checkout"))
(sha256
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/fhcrc/mcl.git")
+ (url "https://github.com/fhcrc/mcl")
(commit version)))
(file-name (git-file-name name version))
(sha256
(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")
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")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/ReactiveX/RxCpp.git")
+ (url "https://github.com/ReactiveX/RxCpp")
(commit (string-append "v" version))))
(sha256
(base32 "1rdpa3jlc181jd08nk437aar085h28i45s6nzrv65apb3xyyz0ij"))
I/O.")
(license license:asl2.0)))
-(define-public r-adaptivesparsity
- (package
- (name "r-adaptivesparsity")
- (version "1.6")
- (source (origin
- (method url-fetch)
- (uri (cran-uri "AdaptiveSparsity" version))
- (sha256
- (base32
- "0imr5m8mll9j6n4icsv6z9rl5kbnwsp9wvzrg7n90nnmcxq2cz91"))))
- (properties
- `((upstream-name . "AdaptiveSparsity")))
- (build-system r-build-system)
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'link-against-armadillo
- (lambda _
- (substitute* "src/Makevars"
- (("PKG_LIBS=" prefix)
- (string-append prefix "-larmadillo"))))))))
- (propagated-inputs
- `(("r-mass" ,r-mass)
- ("r-matrix" ,r-matrix)
- ("r-rcpp" ,r-rcpp)
- ("r-rcpparmadillo" ,r-rcpparmadillo)))
- (inputs
- `(("armadillo" ,armadillo)))
- (home-page "https://cran.r-project.org/web/packages/AdaptiveSparsity")
- (synopsis "Adaptive sparsity models")
- (description
- "This package implements the Figueiredo machine learning algorithm for
-adaptive sparsity and the Wong algorithm for adaptively sparse gaussian
-geometric models.")
- (license license:lgpl3+)))
-
(define-public gemmlowp-for-tensorflow
;; The commit hash is taken from "tensorflow/workspace.bzl".
(let ((commit "38ebac7b059e84692f53e5938f97a9943c120d98")
#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 _
(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.
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/scikit-learn/scikit-learn.git")
+ (url "https://github.com/scikit-learn/scikit-learn")
(commit version)))
(file-name (git-file-name name version))
(sha256
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/scikit-learn/scikit-learn.git")
+ (url "https://github.com/scikit-learn/scikit-learn")
(commit version)))
(file-name (git-file-name "python-scikit-learn" version))
(sha256
(name "lightgbm")
(version "2.0.12")
(source (origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/Microsoft/LightGBM/archive/v"
- version ".tar.gz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Microsoft/LightGBM")
+ (commit (string-append "v" version))))
(sha256
(base32
- "132zf0yk0545mg72hyzxm102g3hpb6ixx9hnf8zd2k55gas6cjj1"))
- (file-name (string-append name "-" version ".tar.gz"))))
+ "0jlvyn7k81dzrh9ij3zw576wbgiwmmr26rzpdxjn1dbpc3njpvzi"))
+ (file-name (git-file-name name version))))
(native-inputs
`(("python-pytest" ,python-pytest)
("python-nose" ,python-nose)))
#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda* (#:key outputs #:allow-other-keys)
- (with-directory-excursion ,(string-append "../LightGBM-" version)
+ (lambda _
+ (with-directory-excursion "../source"
(invoke "pytest" "tests/c_api_test/test_.py")))))))
(build-system cmake-build-system)
(home-page "https://github.com/Microsoft/LightGBM")
(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")
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/kaldi-asr/kaldi.git")
+ (url "https://github.com/kaldi-asr/kaldi")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/alumae/gst-kaldi-nnet2-online.git")
+ (url "https://github.com/alumae/gst-kaldi-nnet2-online")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/alumae/kaldi-gstreamer-server.git")
+ (url "https://github.com/alumae/kaldi-gstreamer-server")
(commit commit)))
(file-name (git-file-name name version))
(sha256
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/tensorflow/tensorflow.git")
+ (url "https://github.com/tensorflow/tensorflow")
(commit (string-append "v" version))))
(file-name (string-append "tensorflow-" version "-checkout"))
(sha256
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/google/double-conversion.git")
+ (url "https://github.com/google/double-conversion")
(commit commit)))
(file-name
(git-file-name "double-conversion"
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/google/highwayhash.git")
+ (url "https://github.com/google/highwayhash")
(commit commit)))
(file-name (string-append "highwayhash-0-" revision
(string-take commit 7)
"1k8szlpm19rcwcxdny9qdm3gmaqq8akb4xlvrzyz8c2d679aak6l"))))
(build-system python-build-system)
(propagated-inputs
- `(("ipython" ,(prompt-toolkit-2-instead-of-prompt-toolkit
- python-ipython))
+ `(("ipython" ,python-ipython)
("numpy" ,python-numpy)
("pandas" ,python-pandas)
("scipy" ,python-scipy)))
@end itemize\n")
(license license:expat)))
-(define-public sbcl-cl-libsvm-format
- (let ((commit "3300f84fd8d9f5beafc114f543f9d83417c742fb")
- (revision "0"))
- (package
- (name "sbcl-cl-libsvm-format")
- (version (git-version "0.1.0" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/masatoi/cl-libsvm-format.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0284aj84xszhkhlivaigf9qj855fxad3mzmv3zfr0qzb5k0nzwrg"))))
- (build-system asdf-build-system/sbcl)
- (native-inputs
- `(("prove" ,sbcl-prove)
- ("prove-asdf" ,sbcl-prove-asdf)))
- (inputs
- `(("alexandria" ,sbcl-alexandria)))
- (synopsis "LibSVM data format reader for Common Lisp")
- (description
- "This Common Lisp library provides a fast reader for data in LibSVM
-format.")
- (home-page "https://github.com/masatoi/cl-libsvm-format")
- (license license:expat))))
-
-(define-public cl-libsvm-format
- (sbcl-package->cl-source-package sbcl-cl-libsvm-format))
-
-(define-public ecl-cl-libsvm-format
- (sbcl-package->ecl-package sbcl-cl-libsvm-format))
-
-(define-public sbcl-cl-online-learning
- (let ((commit "fc7a34f4f161cd1c7dd747d2ed8f698947781423")
- (revision "0"))
- (package
- (name "sbcl-cl-online-learning")
- (version (git-version "0.5" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/masatoi/cl-online-learning.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "14x95rlg80ay5hv645ki57pqvy12v28hz4k1w0f6bsfi2rmpxchq"))))
- (build-system asdf-build-system/sbcl)
- (native-inputs
- `(("prove" ,sbcl-prove)
- ("prove-asdf" ,sbcl-prove-asdf)))
- (inputs
- `(("cl-libsvm-format" ,sbcl-cl-libsvm-format)
- ("cl-store" ,sbcl-cl-store)))
- (arguments
- `(;; FIXME: Tests pass but then the check phase crashes
- #:tests? #f))
- (synopsis "Online Machine Learning for Common Lisp")
- (description
- "This library contains a collection of machine learning algorithms for
-online linear classification written in Common Lisp.")
- (home-page "https://github.com/masatoi/cl-online-learning")
- (license license:expat))))
-
-(define-public cl-online-learning
- (sbcl-package->cl-source-package sbcl-cl-online-learning))
-
-(define-public ecl-cl-online-learning
- (sbcl-package->ecl-package sbcl-cl-online-learning))
-
-(define-public sbcl-cl-random-forest
- (let ((commit "85fbdd4596d40e824f70f1b7cf239cf544e49d51")
- (revision "0"))
- (package
- (name "sbcl-cl-random-forest")
- (version (git-version "0.1" revision commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/masatoi/cl-random-forest.git")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "097xv60i1ndz68sg9p4pc7c5gvyp9i1xgw966b4wwfq3x6hbz421"))))
- (build-system asdf-build-system/sbcl)
- (native-inputs
- `(("prove" ,sbcl-prove)
- ("prove-asdf" ,sbcl-prove-asdf)
- ("trivial-garbage" ,sbcl-trivial-garbage)))
- (inputs
- `(("alexandria" ,sbcl-alexandria)
- ("cl-libsvm-format" ,sbcl-cl-libsvm-format)
- ("cl-online-learning" ,sbcl-cl-online-learning)
- ("lparallel" ,sbcl-lparallel)))
- (arguments
- `(#:tests? #f)) ; The tests download data from the Internet
- (synopsis "Random Forest and Global Refinement for Common Lisp")
- (description
- "CL-random-forest is an implementation of Random Forest for multiclass
-classification and univariate regression written in Common Lisp. It also
-includes an implementation of Global Refinement of Random Forest.")
- (home-page "https://github.com/masatoi/cl-random-forest")
- (license license:expat))))
-
-(define-public cl-random-forest
- (sbcl-package->cl-source-package sbcl-cl-random-forest))
-
-(define-public ecl-cl-random-forest
- (sbcl-package->ecl-package sbcl-cl-random-forest))
-
(define-public gloo
(let ((version "0.0.0") ; no proper version tag
(commit "ca528e32fea9ca8f2b16053cff17160290fc84ce")
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/facebookincubator/gloo.git")
+ (url "https://github.com/facebookincubator/gloo")
(commit commit)))
(file-name (git-file-name name version))
(sha256