Study interactive :: Progress tools open in the Study Hub reader.

All lessons in this module

Previous lesson. Complete MLOps Project Tutorial

MLOps Quick Reference Guide

Quick reference for MLOps tools and practices.

Table of Contents


Version Control

DVC Commands

# Initialize
dvc init

# Track files
dvc add data/train.csv

# Create pipeline
dvc run -n step -d input -o output python script.py

# Reproduce
dvc repro

Git LFS

# Install
git lfs install

# Track
git lfs track "*.pkl"

Experiment Tracking

MLflow

import mlflow

mlflow.set_experiment("experiment")
with mlflow.start_run():
    mlflow.log_param("param", value)
    mlflow.log_metric("metric", value)
    mlflow.sklearn.log_model(model, "model")

Weights & Biases

import wandb
wandb.init(project="project")
wandb.log({"metric": value})

Model Registry

# Register
mlflow.register_model("runs:/<id>/model", "ModelName")

# Transition
client.transition_model_version_stage("ModelName", 1, "Production")

CI/CD

GitHub Actions

- name: Run tests
  run: pytest

- name: Train model
  run: python train.py

Common Issues & Solutions

Issue 1: Large Files in Git

Solution: Use DVC or Git LFS

Issue 2: Lost Experiments

Solution: Use MLflow from the start


Best Practices Checklist


Try next: Version one model artifact and record how you would roll it back.

All lessons in this module

Previous lesson. Complete MLOps Project Tutorial