Part 1: Install Mlflow on Local Machine
Part 2: Train example model and keep in Mlflow Local Machine
Part 3: Expose example api on Local Machine
Part 4: API Transform for Model API
Part 5: Install Mlflow on GKE Cluster with helm
Part 6: Keep Model in Mlflow remote Cluster
Part 7: Serve Model API on Cluster
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).
Install Python3.9 on WSL2 (UBuntu20.04)
- install python3.9 and pip (this style will let you to have python (python2) python3 (python 3.8) and python3.9 (python 3.9.13)
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install python3.9
python3.9 --version
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3.9 get-pip.py
when you use only one environment then for go on you need to use python3.9 and pip3.9 command for example
pip3.9 install -r requirements.txt
- Or you can install Conda or tool that let you have multi environments
ref: https://conda.io/projects/conda/en/latest/user-guide/install/linux.html
wget https://repo.anaconda.com/archive/Anaconda3-2022.10-Linux-x86_64.sh
bash Anaconda3-2022.10-Linux-x86_64.sh
#Follow the prompts on the installer screens.
#If you are unsure about any setting, accept the defaults. You can change them later
conda create -n myenv python=3.9.5# conda activate
# for adtivate conda environment
conda activate myenv# when finished, deactivate your environment with:
conda deactivate
# conda activate
# for adtivate conda environment#restart shell
exec $SHELL
Install Mlflow
pip install mlflow
mlflow --version
mlflow ui
or you can start with other port
mlflow server --host 0.0.0.0 -p 8889
— — — — — — — — — — — — — — — — — — — — — — — — — — — — —
Credit : TrueDigitalGroup
— — — — — — — — — — — — — — — — — — — — — — — — — — — — —