Skip to main content
Home › Categories › Artificial Intelligence & Computing › Git and Data Versioning for Reproducible ML Projects

Git and Data Versioning for Reproducible ML Projects

Author: ZUVDEX Team 4 min read
Git and data versioning version control for data science Git for ML projects dataset versioning reproducible machine learning experiment tracking

A practical guide to using source control and artifact lineage without committing sensitive or oversized data. This guide explains the core concepts, practical trade-offs, evaluation choices, and responsible implementation steps for the topic.

Key Highlights

  • Use Git for code, tests, configuration, and documentation; use fit-for-purpose artifact tracking for large data and models.
  • Record dataset identity, licensing, access, transformations, dependencies, and evaluation alongside code.
  • Keep secrets and sensitive records out of source-control history.
  • Link releases to reviewed commits and model artifacts for reproducibility and rollback.

Use source control for reviewable code

Git records changes to text-based source code, configuration, tests, and documentation. Small, focused commits and reviewable branches help teams understand why behavior changed. Store environment definitions and pipeline parameters with code, pin dependencies where appropriate, and tag releases that correspond to model or service deployments.

Version large data and model artifacts safely

Large datasets and model weights often require specialized storage or data-versioning tools rather than ordinary Git commits. Record immutable identifiers, checksums, source location, license, access policy, transformation version, and retention rules. Never place credentials or restricted personal data in a repository. A pointer is useful only if authorized teams can retrieve the exact artifact.

Capture what makes an experiment reproducible

Reproducibility requires more than the same code. Capture random seeds when meaningful, library and hardware versions, training data snapshot, feature definitions, evaluation data, configuration, and model artifact. Some GPU operations or external APIs may remain nondeterministic; document expected variation instead of promising bit-for-bit repeatability.

Connect team changes to releases

A data or model change should be reviewable and traceable to an owner and purpose. Use access controls, branch protections, code review, and audit logs for sensitive environments. Link experiment records to commits and artifacts. This makes rollback and incident analysis possible, and reduces the chance that a notebook-only result silently becomes production behavior.

Example: reproduce a reported score

To reproduce an experiment, check out the reviewed commit, retrieve the exact dataset version and feature code, restore the declared environment, and run the recorded configuration. Compare results within a documented tolerance if hardware or kernels are nondeterministic. The record should let a teammate trace a score to inputs and code without exposing restricted data.

FAQs

Should datasets be committed directly to Git?

Usually not when they are large, sensitive, frequently changing, or subject to access controls. Use governed storage and version pointers or specialized data-versioning tools.

Does a fixed random seed guarantee reproducibility?

Not always. Hardware kernels, distributed execution, library changes, and external services can introduce nondeterminism. A seed helps control some randomness but is only one part of a reproducibility record.

What should an ML experiment record?

Record code and configuration, dataset and feature versions, environment, model artifact, evaluation set and metrics, responsible owner, and known limitations.

References & Sources

  • Git — Documentation https://git-scm.com/doc
  • DVC — Data and ML experiment versioning https://dvc.org/doc
  • NIST — Secure Software Development Framework https://csrc.nist.gov/projects/ssdf