From 27d6d24e6352012a9d8cf1a7828c557a4539f023 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 17 Jun 2019 14:39:38 +0200 Subject: gnu: python-scikit-learn: Update to 0.20.3. * gnu/packages/machine-learning.scm (python-scikit-learn): Update to 0.20.3. --- gnu/packages/machine-learning.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index b330b2357f..370cfe1a30 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -792,7 +792,7 @@ computing environments.") (define-public python-scikit-learn (package (name "python-scikit-learn") - (version "0.20.1") + (version "0.20.3") (source (origin (method git-fetch) @@ -802,7 +802,7 @@ computing environments.") (file-name (git-file-name name version)) (sha256 (base32 - "0fkhwg3xn1s7ln9q1szq6kwc4jhwvjh8w4kmv9wcrqy7cq3lbv0d")))) + "08aaby5zphfxy83mggg35bwyka7wk91l2qijh8kk0bl08dikq8dl")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From a32e3b90787ab3d221fb1b8d0bfd9c519a874230 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 18 Jun 2019 15:57:43 +0200 Subject: gnu: gemmlowp-for-tensorflow: Use SSE2. * gnu/packages/machine-learning.scm (gemmlowp-for-tensorflow)[arguments]: Only enable SSE2, not SSE4.1 on i686 and x86_64 architectures. --- gnu/packages/machine-learning.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 370cfe1a30..505cc88f4b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -668,7 +668,7 @@ geometric models.") `(#:configure-flags (list ,@(match (%current-system) ((or "x86_64-linux" "i686-linux") - '("-DCMAKE_CXX_FLAGS=-msse4.1")) + '("-DCMAKE_CXX_FLAGS=-msse2")) (_ '()))) #:phases (modify-phases %standard-phases -- cgit v1.2.3 From d60b064d47a1620754b24fd52722ca77a361b8aa Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 18 Jun 2019 17:58:31 +0200 Subject: gnu: Add python-iml. * gnu/packages/machine-learning.scm (python-iml): New variable. --- gnu/packages/machine-learning.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 505cc88f4b..245ccb999b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2018 Fis Trivial ;;; Copyright © 2018 Julien Lepiller ;;; Copyright © 2018 Björn Höfling +;;; Copyright © 2019 Nicolas Goaziou ;;; ;;; This file is part of GNU Guix. ;;; @@ -1753,3 +1754,30 @@ API for beginners that allows users to build models quickly by plugging together building blocks and a subclassing API with an imperative style for advanced research.") (license license:asl2.0))) + +(define-public python-iml + (package + (name "python-iml") + (version "0.6.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "iml" version)) + (sha256 + (base32 + "1k8szlpm19rcwcxdny9qdm3gmaqq8akb4xlvrzyz8c2d679aak6l")))) + (build-system python-build-system) + (propagated-inputs + `(("ipython" ,python-ipython) + ("nose" ,python-nose) + ("numpy" ,python-numpy) + ("pandas" ,python-pandas) + ("scipy" ,python-scipy))) + (home-page "http://github.com/interpretable-ml/iml") + (synopsis "Interpretable Machine Learning (iML) package") + (description "Interpretable ML (iML) is a set of data type objects, +visualizations, and interfaces that can be used by any method designed to +explain the predictions of machine learning models (or really the output of +any function). It currently contains the interface and IO code from the Shap +project, and it will potentially also do the same for the Lime project.") + (license license:expat))) -- cgit v1.2.3 From d93ad19110efa665e6fe273c232733778a676970 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 19 Jun 2019 14:25:17 +0200 Subject: gnu: Add python-keras-applications. * gnu/packages/machine-learning.scm (python-keras-applications): New variable. --- gnu/packages/machine-learning.scm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index 245ccb999b..e751d29b9b 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1781,3 +1781,32 @@ explain the predictions of machine learning models (or really the output of any function). It currently contains the interface and IO code from the Shap project, and it will potentially also do the same for the Lime project.") (license license:expat))) + +(define-public python-keras-applications + (package + (name "python-keras-applications") + (version "1.0.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Keras_Applications" version)) + (sha256 + (base32 + "1rcz31ca4axa6kzhjx4lwqxbg4wvlljkj8qj9a7p9sfd5fhzjyam")))) + (build-system python-build-system) + ;; The tests require Keras, but this package is needed to build Keras. + (arguments '(#:tests? #f)) + (propagated-inputs + `(("python-h5py" ,python-h5py) + ("python-numpy" ,python-numpy))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-pep8" ,python-pytest-pep8) + ("python-pytest-xdist" ,python-pytest-xdist))) + (home-page "https://github.com/keras-team/keras-applications") + (synopsis "Reference implementations of popular deep learning models") + (description + "This package provides reference implementations of popular deep learning +models for use with the Keras deep learning framework.") + (license license:expat))) -- cgit v1.2.3 From 4abc50666e0a30baea3e3bf414e60d57916ab2c0 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 19 Jun 2019 14:25:26 +0200 Subject: gnu: Add python-keras-preprocessing. * gnu/packages/machine-learning.scm (python-keras-preprocessing): New variable. --- gnu/packages/machine-learning.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index e751d29b9b..aebbd1ac5d 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -1810,3 +1810,33 @@ project, and it will potentially also do the same for the Lime project.") "This package provides reference implementations of popular deep learning models for use with the Keras deep learning framework.") (license license:expat))) + +(define-public python-keras-preprocessing + (package + (name "python-keras-preprocessing") + (version "1.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Keras_Preprocessing" version)) + (sha256 + (base32 + "1r98nm4k1svsqjyaqkfk23i31bl1kcfcyp7094yyj3c43phfp3as")))) + (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-six" ,python-six))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pillow" ,python-pillow) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-xdist" ,python-pytest-xdist) + ("tensorflow" ,tensorflow))) + (home-page "https://github.com/keras-team/keras-preprocessing/") + (synopsis "Data preprocessing and augmentation for deep learning models") + (description + "Keras Preprocessing is the data preprocessing and data augmentation +module of the Keras deep learning library. It provides utilities for working +with image data, text data, and sequence data.") + (license license:expat))) -- cgit v1.2.3 From f1765b57b8b4909fa99fab0cafd281ab31f78c94 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 19 Jun 2019 14:26:45 +0200 Subject: gnu: Add python-keras. * gnu/packages/machine-learning.scm (python-keras): New variable. --- gnu/packages/machine-learning.scm | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'gnu/packages/machine-learning.scm') diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm index aebbd1ac5d..2dc7dc81ef 100644 --- a/gnu/packages/machine-learning.scm +++ b/gnu/packages/machine-learning.scm @@ -54,6 +54,7 @@ #:use-module (gnu packages dejagnu) #:use-module (gnu packages gcc) #:use-module (gnu packages glib) + #:use-module (gnu packages graphviz) #:use-module (gnu packages gstreamer) #:use-module (gnu packages image) #:use-module (gnu packages linux) @@ -68,6 +69,7 @@ #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages serialization) + #:use-module (gnu packages sphinx) #:use-module (gnu packages statistics) #:use-module (gnu packages sqlite) #:use-module (gnu packages swig) @@ -1840,3 +1842,76 @@ models for use with the Keras deep learning framework.") module of the Keras deep learning library. It provides utilities for working with image data, text data, and sequence data.") (license license:expat))) + +(define-public python-keras + (package + (name "python-keras") + (version "2.2.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "Keras" version)) + (sha256 + (base32 + "1j8bsqzh49vjdxy6l1k4iwax5vpjzniynyd041xjavdzvfii1dlh")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-tests-for-unavailable-features + (lambda _ + (delete-file "keras/backend/theano_backend.py") + (delete-file "keras/backend/cntk_backend.py") + (delete-file "tests/keras/backend/backend_test.py") + + ;; FIXME: This doesn't work because Tensorflow is missing the + ;; coder ops library. + (delete-file "tests/keras/test_callbacks.py") + #t)) + (replace 'check + (lambda _ + ;; These tests attempt to download data files from the internet. + (delete-file "tests/integration_tests/test_datasets.py") + (delete-file "tests/integration_tests/imagenet_utils_test.py") + + (setenv "PYTHONPATH" + (string-append (getcwd) "/build/lib:" + (getenv "PYTHONPATH"))) + (invoke "py.test" "-v" + "-p" "no:cacheprovider" + "--ignore" "keras/utils")))))) + (propagated-inputs + `(("python-h5py" ,python-h5py) + ("python-keras-applications" ,python-keras-applications) + ("python-keras-preprocessing" ,python-keras-preprocessing) + ("python-numpy" ,python-numpy) + ("python-pydot" ,python-pydot) + ("python-pyyaml" ,python-pyyaml) + ("python-scipy" ,python-scipy) + ("python-six" ,python-six) + ("tensorflow" ,tensorflow) + ("graphviz" ,graphviz))) + (native-inputs + `(("python-pandas" ,python-pandas) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-pep8" ,python-pytest-pep8) + ("python-pytest-timeout" ,python-pytest-timeout) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-sphinx" ,python-sphinx) + ("python-requests" ,python-requests))) + (home-page "https://github.com/keras-team/keras") + (synopsis "High-level deep learning framework") + (description "Keras is a high-level neural networks API, written in Python +and capable of running on top of TensorFlow. It was developed with a focus on +enabling fast experimentation. Use Keras if you need a deep learning library +that: + +@itemize +@item Allows for easy and fast prototyping (through user friendliness, + modularity, and extensibility). +@item Supports both convolutional networks and recurrent networks, as well as + combinations of the two. +@item Runs seamlessly on CPU and GPU. +@end itemize\n") + (license license:expat))) -- cgit v1.2.3