From faf43d9f181e5e72bb9202f498e2f878034c0df6 Mon Sep 17 00:00:00 2001 From: Aaron Davidson Date: Fri, 17 Aug 2018 19:42:39 -0700 Subject: [PATCH] Update release version to 0.5.0 (#323) --- CHANGELOG.rst | 37 ++++++++++++++++++++++++++++ docs/source/tracking.rst | 17 +++++++++++++ docs/source/tutorial.rst | 2 -- mlflow/entities/run.py | 2 ++ mlflow/pytorch.py | 5 ++-- mlflow/tracking/fluent.py | 2 +- mlflow/tracking/service.py | 50 +++++++++++++++++++++----------------- mlflow/version.py | 2 +- test-requirements.txt | 6 ++--- 9 files changed, 92 insertions(+), 31 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 32a1fa032e3b1..1e63b0eb635f9 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,43 @@ Changelog ========= +0.5.0 (2018-08-17) +------------------ + +MLflow 0.5.0 offers some major improvements, including Keras and PyTorch first-class support as models, SFTP support as an artifactory, a new scatterplot visualization to compare runs, and a more complete Python SDK for experiment and run management. + +Breaking changes: + +- The Tracking API has been split into two pieces, a "basic logging" API and a "tracking service" API. The "basic logging" API deals with logging metrics, parameters, and artifacts to the currently-active active run, and is accessible in ``mlflow`` (e.g., ``mlflow.log_param``). The tracking service API allow managing experiments and runs (especially historical runs) and is available in ``mlflow.tracking``. The tracking service API will look analogous to the upcoming R and Java Tracking Service SDKs. Please be aware of the following breaking changes: + + - ``mlflow.tracking`` no longer exposes the basic logging API, only ``mlflow``. So, code that was written like ``from mlflow.tracking import log_param`` will have to be ``from mlflow import log_param`` (note that almost all examples were already doing this). + - Access to the service API goes through the ``mlflow.tracking.get_service()`` function, which relies on the same tracking server set by either the environment variable ``MLFLOW_TRACKING_URI`` or by code with ``mlflow.tracking.set_tracking_uri()``. So code that used to look like ``mlflow.tracking.get_run()`` will now have to do ``mlflow.tracking.get_service().get_run()``. This does not apply to the basic logging API. + - ``mlflow.ActiveRun`` has been converted into a lightweight wrapper around ``mlflow.entities.Run`` to enable the Python ``with`` syntax. This means that there are no longer any special methods on the object returned when calling ``mlflow.start_run()``. These can be converted to the service API. + + - The Python entities returned by the tracking service API are now accessible in ``mlflow.entities`` directly. Where previously you may have used ``mlflow.entities.experiment.Experiment``, you would now just use ``mlflow.entities.Experiment``. The previous version still exists, but is deprecated and may be hidden in a future version. +- REST API endpoint `/ajax-api/2.0/preview/mlflow/artifacts/get` has been moved to `$static_prefix/get-artifact`. This change is coversioned in the JavaScript, so should not be noticeable unless you were calling the REST API directly (#293, @andremchen) + +Features: + +- [Models] Keras integration: we now support logging Keras models directly in the log_model API, model format, and serving APIs (#280, @ToonKBC) +- [Models] PyTorch integration: we now support logging PyTorch models directly in the log_model API, model format, and serving APIs (#264, @vfdev-5) +- [UI] Scatterplot added to "Compare Runs" view to help compare runs using any two metrics as the axes (#268, @ToonKBC) +- [Artifacts] SFTP artifactory store added (#260, @ToonKBC) +- [Sagemaker] Users can specify a custom VPC when deploying SageMaker models (#304, @dbczumar) +- Pyfunc serialization now includes the Python version, and warns if the major version differs (can be suppressed by using ``load_pyfunc(suppress_warnings=True)``) (#230, @dbczumar) +- Pyfunc serve/predict will activate conda environment stored in MLModel. This can be disabled by adding ``--no-conda`` to ``mlflow pyfunc serve`` or ``mlflow pyfunc predict`` (#225, @0wu) +- Python SDK formalized in ``mlflow.tracking``. This includes adding SDK methods for ``get_run``, ``list_experiments``, ``get_experiment``, and ``set_terminated``. (#299, @aarondav) +- ``mlflow run`` can now be run against projects with no ``conda.yaml`` specified. By default, an empty conda environment will be created -- previously, it would just fail. You can still pass ``--no-conda`` to avoid entering a conda environment altogether (#218, @smurching) + +Bug fixes: + +- Fix numpy array serialization for int64 and other related types, allowing pyfunc to return such results (#240, @arinto) +- Fix DBFS artifactory calling ``log_artifacts`` with binary data (#295, @aarondav) +- Fix Run Command shown in UI to reproduce a run when the original run is targeted at a subdirectory of a Git repo (#294, @adrian555) +- Filter out ubiquitious dtype/ufunc warning messages (#317, @aarondav) +- Minor bug fixes and documentation updates (#261, @stbof; #279, @dmatrix; #313, @rbang1, #320, @yassineAlouini; #321, @tomasatdatabricks; #266, #282, #289, @smurching; #267, #265, @aarondav; #256, #290, @ToonKBC; #273, #263, @mateiz; #272, #319, @adrian555; #277, @aadamson; #283, #296, @andrewmchen) + + 0.4.2 (2018-08-07) ------------------ diff --git a/docs/source/tracking.rst b/docs/source/tracking.rst index abb809595611b..5ffc7b0a2d70d 100644 --- a/docs/source/tracking.rst +++ b/docs/source/tracking.rst @@ -72,6 +72,8 @@ Logging Data to Runs You can log data to runs using either the MLflow Python or REST API. This section shows the Python API. +.. _basic_logging_functions: + Basic Logging Functions ^^^^^^^^^^^^^^^^^^^^^^^ @@ -156,6 +158,21 @@ environment variable. mlflow.log_param("a", 1) mlflow.log_metric("b", 2) +Managing Experiments and Runs with the Tracking Service API +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +MLflow provides a more detailed Tracking Service API for managing experiments and runs directly, which is available in the :doc:`mlflow.tracking` package. This makes it possible to query data about past runs, log additional information about them, create experiments and more. + +Example usage: + +.. code:: python + + from mlflow.tracking import get_service + service = get_service() + experiments = service.list_experiments() # returns a list of mlflow.entities.Experiment + run = service.create_run(experiments[0].experiment_id) # returns mlflow.entities.Run + service.log_param(run.info.run_uuid, "hello", "world") + service.set_terminated(run.info.run_uuid) .. _tracking_ui: diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index 15f88ec313211..68a2f587d7075 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -18,8 +18,6 @@ is from UCI's `machine learning repository