MLflow is an open source platform for managing the end-to-end machine learning lifecycle. It tackles four primary functions:
- Tracking experiments to record and compare parameters and results (MLflow Tracking).
- Packaging ML code in a reusable, reproducible form in order to share with other data scientists or transfer to production (MLflow Projects).
- Managing and deploying models from a variety of ML libraries to a variety of model serving and inference platforms (MLflow Models).
- Providing a central model store to collaboratively manage the full lifecycle of an MLflow Model, including model versioning, stage transitions, and annotations (MLflow Model Registry).
For more information refer to
MLflow Tracking is an API and UI for logging parameters, code versions, metrics, and artifacts when running your machine learning code and for later visualizing the results. You can use MLflow Tracking in any environment (for example, a standalone script or a notebook) to log results to local files or to a server, then compare multiple runs. Teams can also use it to compare results from different users.
This setup is heavly based on Toumash's work where a docker-compose
project is proposed to orchestrate database
, FTP server
, mlflow server
and reverse-proxy
images.
In order to configure mlflow server instance
, follow these steps:
- Create the file
.env
and set the following variables:
DB_USER
- username for internal MLflow tracking database (arbitrary)DB_PW
- password for internal MLflow tracking database (arbitrary)DB_ROOTPW
- root password for internal ML Flow tracking database (arbitrary)MLFLOW_SERVER_IP
- remote MLflow tracking instanceMLFLOW_TRACKING_USERNAME
- MLflow proxy authentication usernameMLFLOW_TRACKING_PASSWORD
- MLflow proxy authentication passwordARTIFACT_PATH
- File Storage where artifacts will be storedFTP_USER
- username for internal FTP serverFTP_PASS
- password for internal FTP server
-
Export
MLFLOW_TRACKING_USERNAME
andMLFLOW_TRACKING_PASSWORD
variables -
Run
setup.sh
to install dependencies and createreverse-proxy
authentication file
Build docker images and start containers using docker-compose
:
$ docker-compose up -d --build
$ docker-compose logs -f
Open a web browser at http://<MLFLOW_SERVER_IP> and authenticate with <MLFLOW_TRACKING_USERNAME> and <MLFLOW_TRACKING_PASSWORD>
$ docker-compose rm --stop --force