Machine learning development has far exceeded the complexity and challenges of traditional software development. Now, Databricks open source MLflow platform is expected to solve the four major pain points.
It is understood that students who have tried machine learning development know that its complexity far exceeds software development and is accompanied by a variety of new challenges. At Databricks, we worked with hundreds of home-to-machine learning companies and repeatedly heard the following concerns:
A variety of tools. In every stage of the machine learning life cycle, from data preparation to model training, there are hundreds of open source tools. However, unlike traditional software development (choosing a tool at each stage), in machine learning development you usually want to try every available tool (such as an algorithm) to see if it can improve the experimental results. As a result, many libraries need to be used and produced.
Experiment is difficult to trace. There are many configurable parameters in machine learning algorithms. Whether you are an independent developer or on a team, it is difficult to track the parameters, code, and data used to generate the model in each experiment.
The results of the experiment are difficult to reproduce. Due to the lack of sophisticated tracking capabilities, teams often get into trouble when experimenting with the same code again. Whether it's a data scientist handing training code to an engineer for production, or if you plan to go back to previous research to debug the problem, it's important to reproduce the machine learning workflow.
Machine learning is difficult to deploy. Converting the model into a product is challenging because there are too many deployment tools and model operating environments (such as REST serving, batch reasoning, mobile applications). Since there is no standard way to transfer models from the library to the tools, each new deployment is accompanied by a new risk. Given the above challenges, there is no doubt that in order to make machine learning development as robust and predictable as traditional software development. Sex and wide spread, it must be greatly evolved. For this reason, many organizations have begun to build internal machine learning platforms to manage the machine learning life cycle. For example, Facebook, Google and Uber have created FBLearner Flow, TFX and Michelangelo to manage data preparation, model training and deployment. However, even these internal machine learning platforms have limitations: they only support a small number of built-in algorithms or a single ML library, and are bound to their own company's infrastructure. Users cannot easily use the new ML library and it is difficult to share their research with the broader community.
At Databricks, we believe there is a better way to manage the machine learning life cycle, based on which we have introduced a new open source machine learning platform, MLflow. Currently, the alpha version has been released.
MLflow: A New Open Source Machine Learning Platform
MLflow is inspired by the existing ML platform and has two open concepts in its design:
Open interface: MLflow is designed to support all ML libraries, algorithms, deployment tools, and languages. It is built around REST APIs and simple data formats that can be applied from multiple tools (such as models as lambda functions) instead of supporting only a small amount of Build function. This brings an immediate advantage: MLflow can easily be added to existing code, and it is easy to share executable code in any group using any ML library.
Open source:MLflow is an open source project that users and toolkit developers can extend. In addition, if you want to open source your own code, thanks to the open format of MLflow, it's easy to share workflow steps and models between organizations.
MLflow is still alpha, but we think this version has been very useful in handling ML code, and we'd love to hear from you. Next is a detailed introduction to MLflow and related components.
The MLflow alpha version consists of the following 3 components:
MLflow Tracking is an API that is the UI that shows parameter records, code versions, metrics, and output files when you are running machine learning code for subsequent visualization. With just a few simple lines of code, you can track parameters, metrics and artifacts:
You can use MLflow Tracking to record results to a local file or server in any environment (independent scripts, notebooks, etc.), and then compare multiple operations for comparison. With the web UI, you can view and compare multiple outputs. The team can also use these tools to compare the results of different users' experiments.
Figure: MLflow Tracking UI
MLflow Projects provides a standard format for packaging reusable code. Each project is just a code directory or Git library, using a descriptor file to illustrate its dependencies and how to run the code. The MLflow Project is defined by a simple YAML file (MLproject).
Project can use the Conda environment to illustrate its dependencies. A project may have multiple caller entry points (parameters already specified). You can use the mlflow run command tool to run projects from local files or Git libraries.
MLflow will automatically set the correct environment for the project and run it. In addition, if you use the Tracking API in your project, MLflow will remember the version and parameters of the project being executed. You can easily run the same code again.
The project format makes it easier to share reusable code. With MLflow Tracking, the MLflow Project can provide you with extremely easy-to-use tools for replication, expansion, and experimentation.
The MLflow Model is a convention that packs machine learning models into a variety of formats (called flavors). MLflow offers a variety of tools to help you deploy different flavors. Each MLflow Model is stored as a directory containing the arbitrary file and an MLmodel descriptor file (which lists the flavors it applies to).
In the above example, the model can be used with tools that support the sklearn and python_function model flavors.
MLflow provides tools for deploying common models on different platforms. For example, any model that supports the python_function flavor can be deployed on Docker-based REST servers or cloud platforms such as Azure ML and AWS SageMaker.
Start using MLflow
The next step
MLflow has just started, so there is still a lot of work to be done. In addition to project updates, we also plan to introduce important new components (such as Monitoring), library integrations, and extensions we have released (such as support for more environments). You can follow our blog for more information.
Via Databricks, Lei Feng network AI study compile.