MLflow
lastmod 2026-07-16created 2024-06-0424 edits
Build better models and generative AI apps on a unified, end-to-end, open source MLOps platform
Categories
- MLflow:Basic
- MLflow:Docker
- MLflow:Rest
- MLflow:Auth
- MLflow:Serving -
mlflow models serve - MLflow:EnvironmentVariables
Command-Line Interface
It lists the environment variables along with the command-line arguments.
Introduction
MLflow is an open-source platform that helps develop, train, debug, and deploy machine learning models. MLflow helps you efficiently perform key tasks in machine learning projects, such as model tuning and tracking, model serving, and model version control.
- Pros
- Open source. Designed to integrate easily into other MLOps platforms.
- Integrates with various machine learning frameworks, making machine learning model development and management easier.
- Model development, testing, deployment, monitoring, and management can be done in a unified interface, improving productivity and efficiency.
- Run various experiments, and easily track and compare experiment results.
- Evaluate model performance and stability, and version models.
- Provides security and scalability suitable for enterprise-grade systems.
- Cons
- In some cases it is difficult or impossible to apply MLflow to a model's development environment.
- If you need additional MLflow features, separate programming is required.
- The model development and management features provided by MLflow may not be sufficient.
MLflow consists of four main components, as below. These four, MLflow Tracking, MLflow Porjects, MLflow Models, and Model Registry, are the main features of MLFlow.
MLflow Tracking
MLflow Tracking provides features to easily log, track, and visualize all the data and information obtained while developing machine learning models. MLflow Tracking can be used from multiple languages and frameworks, and can run on a local or remote server. It integrates with various databases and cloud storage, so experiment data can be stored and managed efficiently. These features make it possible to integrate into various MLOps platforms.
It has the following detailed features.
- Experiment run management: tracks the start and end time of experiments, the person in charge, experiment environment information, etc.
- Code and data version control: tracks the code and data versions used in experiments
- Metric and result tracking: tracks performance metrics of models produced in experiments and records model results
- Model artifact management: stores and tracks model artifacts produced in experiments
- Remote execution and tracking: tracks experiments run in other environments
- Visualization and comparison: visualizes experiment results and compares them with other experiment results
MLflow Projects
MLflow Projects provides features for organizing and managing projects when developing machine learning models. It packages the code, data, environment information, parameters, etc. of a machine learning project, and lets you run and track it using the same packaged environment. A Project is managed with a file named MLproject. This file contains the project's code, environment information, and so on, so you can use it to rerun in the same environment.
It has the following detailed features.
- Code version control: manages the project's code by integrating with version control systems such as Git
- Project packaging: packages the project's code with the required packages, data, etc. for easy distribution and provides a runtime environment
- Runtime environment management: configures the project's runtime environment, making it possible to create an isolated runtime environment
- Parameter management: manages the parameters used at run time
- Model version control: versions and stores models so they can be reused later
MLflow Models
MLflow Models provides features for model management and deployment when developing machine learning models. It is a comprehensive model management feature that supports training, evaluation, and inference of machine learning models. It makes it convenient to store, version, convert formats, manage metadata, and deploy models during machine learning model development.
It has the following detailed features.
- Model storage and version control: stores and versions machine learning models, enabling comparison with previous versions and reuse
- Model inference function definition: defines inference functions for stored models, making it easy to predict on new data
- Model format conversion: converts model formats between various machine learning libraries and frameworks, making models easy to port
- Model metadata management: tracks model metadata, such as the model's creation date, creator, and training data
- Model deployment: deploys stored models to a server so clients can easily run model inference
Model Registry
Model Registry serves as a centralized repository for sharing, tracking, validating, and deploying machine learning models within a team. Model Registry supports various forms of collaboration at every stage of the model lifecycle, allowing machine learning developers and data scientists on a team to version models together.
It has the following detailed features.
- Model storage and version control: stores and versions machine learning models, enabling comparison with previous versions and reuse
- Model registration: in Model Registry, models are registered so that information about them is shared with other team members
- Model version control: Model Registry manages model versions, enabling comparison with and tracking of previous versions
- Model deployment: Model Registry deploys models so that other team members can run model inference
How to run the server
MLflow Tracking Server (including UI):
## 가장 기본적인 형태입니다. 브라우저에서 http://127.0.0.1:5000 으로 접속하면 UI가 뜹니다
mlflow server --host 127.0.0.1 --port 5000
To specify backend storage:
# SQLite 백엔드 + 로컬 아티팩트 디렉터리
# (Model Registry를 쓰려면 DB 백엔드가 필수)
mlflow server \
--backend-store-uri sqlite:///mlflow.db \
--default-artifact-root ./mlartifacts \
--host 127.0.0.1 \
--port 5000
with Triton
- MLflow Triton Plugin | NVIDIA NGC
- [Recommended] Serving and Managing ML models with Mlflow and Nvidia Triton Inference Server | by Ashwin Mudhol | Medium
How to serve MLflow models
- See MLflow:Serving.
Deploy MLflow Model to Modal
Main storage formats supported by MLflow
| Format | Description | Suitable for |
| MLflow Model (mlmodel) | MLflow standard packaging. MLmodel metafile + model binary + | All models (recommended default) |
| pickle / joblib | Python object serialization | Traditional ML such as scikit-learn, XGBoost, LightGBM |
| TorchScript (.pt) | PyTorch model serialization | PyTorch models such as PointCNN++ and Predator |
| ONNX (.onnx) | Framework-agnostic intermediate representation | Cross-framework serving, lightweight inference |
| SavedModel (TF) | TensorFlow standard | TensorFlow/Keras models |
Summary of what MLflow records
| Category | How to log | Contents |
| Parameters | | Learning rate, batch size, number of epochs, algorithm, etc. |
| Metrics | | loss, accuracy, F1, MAE, RMSE, etc. (can be logged per step) |
| Model | | Model weights + Signature (input/output schema) |
| Artifacts | | Confusion matrix images, training curve plots, config files, etc. |
| Dataset information | | Version and path of the dataset used for training |
| Tags | | Model type, person in charge, experiment purpose, etc. |
See also
- Workflow management system (WfMS; WFMS; Workflow Engine)
- Kubeflow
- Airflow
- JupyterFlow
- Argo Workflows
- Seldon Core - an MLOps framework for packaging, deploying, monitoring, and managing thousands of production machine learning models
- MLops