GitLab Blog

Build an ML app pipeline with GitLab Model Registry using MLflow

thumbnail

ML App Pipeline with GitLab Model Registry using MLflow

Introduction

This tutorial will guide you through setting up an MLOps pipeline with GitLab Model Registry using MLflow. MLOps is crucial for managing and automating the lifecycle of machine learning models, from development to deployment and maintenance.

Prerequisites

  • Basic knowledge of GitLab pipelines
  • Basic knowledge of MLflow
  • A Kubernetes cluster
  • Dockerfile

Steps

  1. Set up environment variables of MLflow
  2. Train and log candidates at merge request
  3. Register the most successful candidate
  4. Dockerize and deploy an ML app with the registered model

Details

  • Train models using Random Forest Classifier, Decision Tree, and Logistic Regression
  • Create pipeline stages for training steps
  • Trigger pipeline manually in merge requests
  • View candidate details in Model Experiments after pipeline completion
  • Dockerize ML app and deploy with registered model
  • Access Docker image from Container Registry for deployment

Additional Resources

Credits

This tutorial and sample projects were created and shared by OBSS.