Skip to main content

MLflow: A Platform for ML Development and Productionization

Project description

MLflow Skinny: A Lightweight Machine Learning Lifecycle Platform Client

MLflow Skinny is a lightweight MLflow package without SQL storage, server, UI, or data science dependencies. MLflow Skinny supports:

  • Tracking operations (logging / loading / searching params, metrics, tags + logging / loading artifacts)

  • Model registration, search, artifact loading, and transitions

  • Execution of GitHub projects within notebook & against a remote target.

Additional dependencies can be installed to leverage the full feature set of MLflow. For example:

  • To use the mlflow.sklearn component of MLflow Models, install scikit-learn, numpy, and pandas.

  • To use SQL-based metadata storage, install sqlalchemy, alembic, and sqlparse.

MLflow: A Machine Learning Lifecycle Platform

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 be 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). MLflow’s current components are:

  • MLflow Tracking: An API to log parameters, code, and results in machine learning experiments and compare them using an interactive UI.

  • MLflow Projects: A code packaging format for reproducible runs using Conda and Docker, so you can share your ML code with others.

  • MLflow Models: A model packaging format and tools that let you easily deploy the same model (from any ML library) to batch and real-time scoring on platforms such as Docker, Apache Spark, Azure ML and AWS SageMaker.

  • MLflow Model Registry: A centralized model store, set of APIs, and UI, to collaboratively manage the full lifecycle of MLflow Models.

Latest Docs Labeling Action Status Examples Action Status Examples Action Status Latest Python Release Latest Conda Release Latest CRAN Release Maven Central Apache 2 License Total Downloads Slack

Installing

Install MLflow from PyPI via pip install mlflow

MLflow requires conda to be on the PATH for the projects feature.

Nightly snapshots of MLflow master are also available here.

Install a lower dependency subset of MLflow from PyPI via pip install mlflow-skinny Extra dependencies can be added per desired scenario. For example, pip install mlflow-skinny pandas numpy allows for mlflow.pyfunc.log_model support.

Documentation

Official documentation for MLflow can be found at https://mlflow.org/docs/latest/index.html.

Roadmap

The current MLflow Roadmap is available at https://github.com/mlflow/mlflow/milestone/3. We are seeking contributions to all of our roadmap items with the help wanted label. Please see the Contributing section for more information.

Community

For help or questions about MLflow usage (e.g. “how do I do X?”) see the docs or Stack Overflow.

To report a bug, file a documentation issue, or submit a feature request, please open a GitHub issue.

For release announcements and other discussions, please subscribe to our mailing list (mlflow-users@googlegroups.com) or join us on Slack.

Running a Sample App With the Tracking API

The programs in examples use the MLflow Tracking API. For instance, run:

python examples/quickstart/mlflow_tracking.py

This program will use MLflow Tracking API, which logs tracking data in ./mlruns. This can then be viewed with the Tracking UI.

Launching the Tracking UI

The MLflow Tracking UI will show runs logged in ./mlruns at http://localhost:5000. Start it with:

mlflow ui

Note: Running mlflow ui from within a clone of MLflow is not recommended - doing so will run the dev UI from source. We recommend running the UI from a different working directory, specifying a backend store via the --backend-store-uri option. Alternatively, see instructions for running the dev UI in the contributor guide.

Running a Project from a URI

The mlflow run command lets you run a project packaged with a MLproject file from a local path or a Git URI:

mlflow run examples/sklearn_elasticnet_wine -P alpha=0.4

mlflow run https://github.com/mlflow/mlflow-example.git -P alpha=0.4

See examples/sklearn_elasticnet_wine for a sample project with an MLproject file.

Saving and Serving Models

To illustrate managing models, the mlflow.sklearn package can log scikit-learn models as MLflow artifacts and then load them again for serving. There is an example training application in examples/sklearn_logistic_regression/train.py that you can run as follows:

$ python examples/sklearn_logistic_regression/train.py
Score: 0.666
Model saved in run <run-id>

$ mlflow models serve --model-uri runs:/<run-id>/model

$ curl -d '{"columns":[0],"index":[0,1],"data":[[1],[-1]]}' -H 'Content-Type: application/json'  localhost:5000/invocations

Contributing

We happily welcome contributions to MLflow. We are also seeking contributions to items on the MLflow Roadmap. Please see our contribution guide to learn more about contributing to MLflow.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mlflow-skinny-1.24.0.tar.gz (3.1 MB view details)

Uploaded Source

Built Distribution

mlflow_skinny-1.24.0-py3-none-any.whl (3.3 MB view details)

Uploaded Python 3

File details

Details for the file mlflow-skinny-1.24.0.tar.gz.

File metadata

  • Download URL: mlflow-skinny-1.24.0.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for mlflow-skinny-1.24.0.tar.gz
Algorithm Hash digest
SHA256 ad18484833bb482875ca38a46f5e2c9b8a9c4a3028f835d0d9c017af50d703d4
MD5 5325c9e63349793cf06d9bba59f7ada3
BLAKE2b-256 331f7546567ea32a4611e4d7c7d5e0d9cd01eaca35e65bac07f8c19b9e05e6a3

See more details on using hashes here.

File details

Details for the file mlflow_skinny-1.24.0-py3-none-any.whl.

File metadata

  • Download URL: mlflow_skinny-1.24.0-py3-none-any.whl
  • Upload date:
  • Size: 3.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for mlflow_skinny-1.24.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c49bcdacea712bbb1fe120fadab8b5eed6e16c116e26b405325deb8e608d0cb
MD5 8821283b4e3fb773aebc5bdcb84354ec
BLAKE2b-256 788af53998ac2ca7bf8a0150cb181dafdd62872fb508ed385be5f0f459381a43

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page