v0.5.0
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 inmlflow.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, onlymlflow
. So, code that was written likefrom mlflow.tracking import log_param
will have to befrom 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 variableMLFLOW_TRACKING_URI
or by code withmlflow.tracking.set_tracking_uri()
. So code that used to look likemlflow.tracking.get_run()
will now have to domlflow.tracking.get_service().get_run()
. This does not apply to the basic logging API. -
mlflow.ActiveRun
has been converted into a lightweight wrapper aroundmlflow.entities.Run
to enable the Pythonwith
syntax. This means that there are no longer any special methods on the object returned when callingmlflow.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 usedmlflow.entities.experiment.Experiment
, you would now just usemlflow.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
tomlflow pyfunc serve
ormlflow pyfunc predict
(#225, @0wu) - Python SDK formalized in
mlflow.tracking
. This includes adding SDK methods forget_run
,list_experiments
,get_experiment
, andset_terminated
. (#299, @aarondav) mlflow run
can now be run against projects with noconda.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)