gnu: Replace uses of 'libjpeg' with 'libjpeg-turbo'.
[jackhill/guix/guix.git] / gnu / packages / machine-learning.scm
index 254ee59..d92a74e 100644 (file)
@@ -12,6 +12,7 @@
 ;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -60,7 +61,7 @@
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages image)
   #:use-module (gnu packages linux)
-  #:use-module (gnu packages lisp)
+  #:use-module (gnu packages lisp-xyz)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages mpi)
   #:use-module (gnu packages ocaml)
@@ -69,6 +70,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages serialization)
@@ -776,7 +778,7 @@ than 8 bits, and at the end only some significant 8 bits are kept.")
     (inputs
      `(("giflib" ,giflib)
        ("lapack" ,lapack)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("libx11" ,libx11)
        ("openblas" ,openblas)
@@ -1302,7 +1304,7 @@ Python.")
        ("openssl" ,openssl)
        ("zlib" ,zlib)))
     (native-inputs
-     `(("protobuf" ,protobuf-next)
+     `(("protobuf" ,protobuf)
        ("python" ,python-wrapper)))
     (home-page "https://grpc.io")
     (synopsis "High performance universal RPC framework")
@@ -1607,8 +1609,8 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))
                #t))))))
     (native-inputs
      `(("pkg-config" ,pkg-config)
-       ("protobuf:native" ,protobuf-next) ; protoc
-       ("protobuf:src" ,(package-source protobuf-next))
+       ("protobuf:native" ,protobuf-3.6) ; protoc
+       ("protobuf:src" ,(package-source protobuf-3.6))
        ("eigen:src" ,(package-source eigen-for-tensorflow))
        ;; install_pip_packages.sh wants setuptools 39.1.0 specifically.
        ("python-setuptools" ,python-setuptools-for-tensorflow)
@@ -1735,7 +1737,7 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))
        ("python-gast" ,python-gast)
        ("python-grpcio" ,python-grpcio)
        ("python-numpy" ,python-numpy)
-       ("python-protobuf" ,python-protobuf-next)
+       ("python-protobuf" ,python-protobuf-3.6)
        ("python-six" ,python-six)
        ("python-termcolo" ,python-termcolor)
        ("python-wheel" ,python-wheel)))
@@ -1744,14 +1746,14 @@ INSTALL_RPATH " (assoc-ref outputs "out") "/lib)\n")))
        ("eigen" ,eigen-for-tensorflow)
        ("gemmlowp" ,gemmlowp-for-tensorflow)
        ("lmdb" ,lmdb)
-       ("libjpeg" ,libjpeg)
+       ("libjpeg" ,libjpeg-turbo)
        ("libpng" ,libpng)
        ("giflib" ,giflib)
        ("grpc" ,grpc)
        ("jsoncpp" ,jsoncpp-for-tensorflow)
        ("snappy" ,snappy)
        ("sqlite" ,sqlite)
-       ("protobuf" ,protobuf-next)
+       ("protobuf" ,protobuf-3.6)
        ("python" ,python-wrapper)
        ("zlib" ,zlib)))
     (home-page "https://tensorflow.org")
@@ -2051,3 +2053,67 @@ includes an implementation of Global Refinement of 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")
+        (revision "0"))
+    (package
+      (name "gloo")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://github.com/facebookincubator/gloo.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "1q9f80zy75f6njrzrqkmhc0g3qxs4gskr7ns2jdqanxa2ww7a99w"))))
+      (build-system cmake-build-system)
+      (native-inputs
+       `(("googletest" ,googletest)))
+      (arguments
+       `(#:configure-flags '("-DBUILD_TEST=1")
+         #:phases
+         (modify-phases %standard-phases
+           (replace 'check
+             (lambda _
+               (invoke "make" "gloo_test")
+               #t)))))
+      (synopsis "Collective communications library")
+      (description
+       "Gloo is a collective communications library.  It comes with a
+number of collective algorithms useful for machine learning applications.
+These include a barrier, broadcast, and allreduce.")
+      (home-page "https://github.com/facebookincubator/gloo")
+      (license license:bsd-3))))
+
+(define-public python-umap-learn
+  (package
+    (name "python-umap-learn")
+    (version "0.3.10")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "umap-learn" version))
+       (sha256
+        (base32
+         "02ada2yy6km6zgk2836kg1c97yrcpalvan34p8c57446finnpki1"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-numba" ,python-numba)
+       ("python-numpy" ,python-numpy)
+       ("python-scikit-learn" ,python-scikit-learn)
+       ("python-scipy" ,python-scipy)))
+    (home-page "https://github.com/lmcinnes/umap")
+    (synopsis
+     "Uniform Manifold Approximation and Projection")
+    (description
+     "Uniform Manifold Approximation and Projection is a dimension reduction
+technique that can be used for visualisation similarly to t-SNE, but also for
+general non-linear dimension reduction.")
+    (license license:bsd-3)))