liveBook · Manning

Versioning

As explained in Machine Learning Platform Engineering

The systematic recording and management of changes to files, code, or other managed artifacts over time.

A production model can change even when its code does not: a revised dataset can change its behavior. Versioning records which code, data, configuration, and model artifact belong together so a result can be reproduced and a deployed model can be traced. Git is a familiar choice for code; data versioning is harder because datasets take many forms and have no equally ubiquitous tool. section 1.1.1 section 2.1.3

Build versioning into the ML workflow rather than adding it after training:

  • Track the origin and revisions of raw, transformed, and annotated data. Record when, where, how, and why data was collected; lineage makes it easier to correct bad data and recreate a dataset. section 2.1.1
  • Keep code, configuration, data, and trained models as distinct versioned components with lineage links. Associate each model with its dataset version, and log experiment results, configuration, and checkpoints. section 2.1.3
  • Choose pipeline data-access and storage methods that preserve version control and lineage. MLflow can log experiments and track model versions alongside a training pipeline. section 8.2 section 9.3
  • Log model transitions through staging and production. If a release underperforms, its version and lineage provide context for investigation and make rollback to a previous model straightforward. section 2.1.5 section 2.1.6

Revising a car-price dataset

For a second-hand car price estimator, collect data for the intended passenger-car market and use a versioned ETL pipeline to generate the dataset. Preserve collection lineage so an erroneous dataset can be recreated and corrected without rebuilding complex extraction scripts blindly. section 2.1.1

Figure 2.5 A view of a retraining pipeline using the modular codebase concept. This approach of keeping the model, code, configuration files, and data as distinct versioned components with lineage links ensures that the process remains flexible, fast, and adaptable while enabling experimentation, debugging, and iterative development.
A screenshot of a computer

AI-generated content may be incorrect.

The retraining-pipeline diagram places model, code, configuration, and data in separate versioned components connected by lineage links. section 2.1.3

The same discipline extends beyond conventional models: prompts in production LLM applications also need version control and systematic testing. Versioning is most useful when paired with validation, experiment tracking, and monitoring—not treated as a substitute for them. section 13.0 section 2.1.6

How Machine Learning Platform Engineering covers it

How deep it goes
Explains lineage and operational uses, including dataset correction and rollback, but does not specify versioning commands or a data-versioning tool.
Examples
Uses a versioned ETL pipeline for a car-price dataset and MLflow experiment and model tracking for a movie recommender.
What it assumes
Assumes familiarity with code version control and builds on basic training pipelines while distinguishing the harder problem of data versioning.
What you can do after
Operate/configure it by linking model releases to dataset versions, logging transitions, and retaining earlier models for rollback.
How it connects
Links versioning to data lineage, experiment tracking, training pipelines, deployment, monitoring, and prompt testing.

Also explained in

Compare how 25 books explain versioning →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning Platform Engineering. The section links point to the parts of the book it draws on.