unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Marius Bakke <mbakke@fastmail.com>
To: 37234@debbugs.gnu.org
Subject: [bug#37234] [PATCH 21/21] gnu: Add mlflow.
Date: Fri, 30 Aug 2019 16:25:39 +0200	[thread overview]
Message-ID: <20190830142539.28376-21-mbakke@fastmail.com> (raw)
In-Reply-To: <20190830142539.28376-1-mbakke@fastmail.com>

* gnu/packages/machine-learning.scm (mlflow): New public variable.
---
 gnu/packages/machine-learning.scm | 122 +++++++++++++++++++++++++++++-
 1 file changed, 121 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/machine-learning.scm b/gnu/packages/machine-learning.scm
index e48c91a2cf..19b1c7482b 100644
--- a/gnu/packages/machine-learning.scm
+++ b/gnu/packages/machine-learning.scm
@@ -1,7 +1,7 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
-;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2016, 2017, 2019 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Kei Kebreau <kkebreau@posteo.net>
@@ -52,6 +52,7 @@
   #:use-module (gnu packages cran)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages dejagnu)
+  #:use-module (gnu packages docker)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages graphviz)
@@ -73,7 +74,9 @@
   #:use-module (gnu packages statistics)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages swig)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages version-control)
   #:use-module (gnu packages web)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
@@ -354,6 +357,123 @@ networks) based on simulation of (stochastic) flow in graphs.")
 algorithm.")
     (license license:gpl3)))
 
+(define-public mlflow
+  (package
+    (name "mlflow")
+    (version "1.2.0")
+    (source (origin
+              ;; The PyPI release lacks tests, so we take the git repository.
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mlflow/mlflow")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0rn3anjkm0i6phyvh7xsrvxbhqp5dhvqf74kaa69q5hgy4y2y0py"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'adjust-tests
+           (lambda _
+             ;; TODO: It would be great to disable the individual test cases
+             ;; instead of deleting whole files, e.g. with
+             ;; (setenv "PYTEST_ADDOPTS" "-k not foo and not bar").
+             (for-each delete-file
+                       '(;; These tests require packages not yet available
+                         ;; in Guix.
+                         "tests/azureml/test_image_creation.py"
+                         "tests/h2o/test_h2o_model_export.py"
+                         "tests/onnx/test_onnx_model_export.py"
+                         "tests/projects/test_docker_projects.py"
+                         "tests/projects/test_kubernetes.py"
+                         "tests/projects/test_projects.py"
+                         "tests/pyfunc/test_spark.py"
+                         "tests/pytorch/test_pytorch_model_export.py"
+                         "tests/spark/test_spark_model_export.py"
+                         "tests/store/test_azure_blob_artifact_repo.py"
+                         "tests/store/test_gcs_artifact_repo.py"
+                         "tests/store/test_sftp_artifact_repo.py"
+                         "tests/tracking/test_tracking.py"
+
+                         ;; TODO: These require installing 'mlflow_test_plugin'.
+                         "tests/server/test_handlers.py"
+                         "tests/store/test_artifact_repository_registry.py"
+                         "tests/tracking/test_utils.py"
+                         "tests/tracking/context/test_registry.py"
+
+                         ;; This requires a running Docker daemon.
+                         "tests/models/test_cli.py"
+
+                         ;; These require a standalone version of 'conda'.
+                         "tests/pyfunc/test_scoring_server.py"
+                         "tests/pyfunc/test_model_export_with_class_and_artifacts.py"
+
+                         ;; These tests need internet access.
+                         "tests/projects/test_projects_cli.py"
+                         "tests/tensorflow_autolog/test_tensorflow_autolog.py"))
+
+             ;; The test script stores non-zero exit codes in an "$err" variable
+             ;; and checks it at the end of the run.  We need to allow exit code 5
+             ;; from pytest, meaning "no tests were collected", because the above
+             ;; deletions empties some of the directories given to pytest.
+             (substitute* "travis/run-large-python-tests.sh"
+               (("trap 'err=1' ERR")
+                "trap '[[ \"$?\" != \"5\" ]] && err=1' ERR"))
+
+             #t))
+         (delete 'check)
+         (add-after 'install 'check
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (add-installed-pythonpath inputs outputs)
+             (setenv "PATH"
+                     (string-append (assoc-ref outputs "out")
+                                    "/bin:" (getenv "PATH")))
+             (invoke "./travis/run-large-python-tests.sh"))))))
+    (native-inputs
+     `( ;; For tests.
+       ("python-keras" ,python-keras)
+       ("python-moto" ,python-moto)
+       ("python-pyarrow" ,python-pyarrow)
+       ("python-pytest" ,python-pytest)
+       ("tensorflow" ,tensorflow)))
+    (propagated-inputs
+     `(("python-alembic" ,python-alembic)
+       ("python-boto3" ,python-boto3)
+       ("python-click" ,python-click)
+       ("python-cloudpickle" ,python-cloudpickle)
+       ("python-databricks-cli" ,python-databricks-cli)
+       ("python-dateutil" ,python-dateutil)
+       ("python-docker" ,python-docker-py)
+       ("python-entrypoints" ,python-entrypoints)
+       ("python-flask" ,python-flask)
+       ("python-gitpython" ,python-gitpython)
+       ("python-gorilla" ,python-gorilla)
+       ("python-gunicorn" ,python-gunicorn)
+       ("python-numpy" ,python-numpy)
+       ("python-pandas" ,python-pandas)
+       ("python-protobuf" ,python-protobuf-next)
+       ("python-pyyaml" ,python-pyyaml)
+       ("python-querystring-parser" ,python-querystring-parser)
+       ("python-requests" ,python-requests)
+       ("python-scikit-learn" ,python-scikit-learn)
+       ("python-simplejson" ,python-simplejson)
+       ("python-six" ,python-six)
+       ("python-sqlalchemy" ,python-sqlalchemy)
+       ("python-sqlparse" ,python-sqlparse)
+       ("python-waitress" ,python-waitress)))
+    (home-page "https://mlflow.org/")
+    (synopsis "Manage machine learning workflows")
+    (description
+     "MLflow is a platform to streamline machine learning development,
+including tracking experiments, packaging code into reproducible runs, and
+sharing and deploying models.  MLflow offers a set of lightweight APIs that
+can used with any existing machine learning application or library (TensorFlow,
+PyTorch, XGBoost, etc), wherever you currently run ML code (e.g. in notebooks,
+standalone applications or the cloud).")
+    (license license:asl2.0)))
+
 (define-public randomjungle
   (package
     (name "randomjungle")
-- 
2.22.1

  parent reply	other threads:[~2019-08-30 14:27 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30 14:23 [bug#37234] [PATCH 00/21] MLflow Marius Bakke
2019-08-30 14:25 ` [bug#37234] [PATCH 01/21] gnu: Add python-gunicorn Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 02/21] gnu: Add python-databricks-cli Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 03/21] gnu: Add python-gorilla Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 04/21] gnu: Add python-querystring-parser Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 05/21] gnu: Add python-minio Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 06/21] gnu: python-docker-py: Propagate runtime dependency Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 07/21] gnu: python-botocore: Update to 1.12.209 Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 08/21] gnu: Add python-boto3 Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 09/21] gnu: python-botocore: Remove unused inputs Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 10/21] gnu: Add python-sshpubkeys Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 11/21] gnu: Add python-jsonpickle Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 12/21] gnu: Add python-pytest-aiohttp Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 13/21] gnu: Add python-aws-xray-sdk Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 14/21] gnu: Add python-jsondiff Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 15/21] gnu: Add python-jose Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 16/21] gnu: Add python-boto Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 17/21] gnu: Add python-aws-sam-translator Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 18/21] gnu: Add python-cfn-lint Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 19/21] gnu: python-pyyaml: Add version 5.1 Marius Bakke
2019-08-30 14:25   ` [bug#37234] [PATCH 20/21] gnu: Add python-moto Marius Bakke
2019-08-30 14:25   ` Marius Bakke [this message]
2019-09-04 12:18 ` [bug#37234] [PATCH 00/21] MLflow Ludovic Courtès
2020-11-21  0:27   ` bug#37234: " Marius Bakke
2020-11-21 14:15     ` [bug#37234] " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830142539.28376-21-mbakke@fastmail.com \
    --to=mbakke@fastmail.com \
    --cc=37234@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).