Course contentsShow
← Machine Learning and Deep Learning
Lesson 2830 of 3,53861. Experiment Tracking and Model ManagementFree lesson

Model Versioning Strategies

Semantic versioning for models, major vs minor changes, and linking model versions to experiments and code commits.

Model Versioning Strategies

What you'll learn: How to systematically version your ML models using semantic versioning principles and link them to experiments and code.


The Core Challenge

You've learned why model versioning matters and what metadata to track. Now you need a strategy for naming and organizing versions so teams can understand what changed and why.


Semantic Versioning for Models

Adopt a versioning scheme inspired by software: MAJOR.MINOR.PATCH (e.g., 2.3.1)

  • MAJOR version: Fundamental changes that break compatibility

    • New architecture (switching from ResNet to ViT)
    • Different input/output schema
    • Complete retraining with new data source
  • MINOR version: Backward-compatible improvements

    • Hyperparameter tuning that improves metrics
    • Additional training on more data (same distribution)
    • Feature engineering changes
  • PATCH version: Bug fixes or tiny adjustments

    • Fixing preprocessing bugs
    • Correcting deployment configurations
    • No retraining involved

Linking Versions to Experiments and Code

Every model version should reference:

  1. Experiment ID from your tracking system (W&B run, MLflow experiment)
  2. Git commit hash of the training code
  3. Data version or dataset snapshot identifier

This creates a complete audit trail: "Model v2.1.0 came from experiment run-abc123, trained with code commit 7f3a9b2, on dataset v5."

Analogy: Think of it like a recipe book where each dish version links to the specific ingredient list (data), cooking instructions version (code), and the chef's notes from that attempt (experiment logs).


Key Takeaway: Use semantic versioning (MAJOR.MINOR.PATCH) to communicate the significance of model changes, and always link each version to its experiment run, code commit, and data version for full reproducibility.