This Production ML concept is the current object: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.
Production ML
Dataset Versioning
Dataset versioning pins the data snapshot, transformation, split, schema, license/use scope, and provenance behind each reported result.
Concept Structure
Dataset Versioning
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Commit a prediction against the code witness.
Learner Contract
What this page should let you do.
1 prerequisite listed; refresh them before leaning on the math or code.
Explain the mechanism, trace the main notation, and answer the prediction probe against the code witness.
Read the intuition before the notation; the math should name a mechanism you already felt.
Follow this edge after making one prediction here; the next page should reuse the result, not restart the route.
Claim/source review status
Claim review needed
Some claims still need exact source-support review.Metadata-derived; review may be AI-assisted. Not a human certification.01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
An evaluation score is only meaningful if we can say what evidence produced it. If yesterday's model scored 82 percent and today's model scored 84 percent, the obvious story is that the model improved. But that story collapses if the test set changed, the preprocessing code silently filtered out hard examples, or a benchmark near-duplicate entered training.
Dataset versioning is the habit of naming the evidence bundle, not merely naming a folder. The bundle includes the raw snapshot, the transformation code, the split manifest, the schema, the license or use scope, and a provenance note. A score without that bundle is a loose number. A score with that bundle is a claim someone else can inspect.
Think of a dataset version like the sealed envelope behind an experiment. It does not guarantee that the experiment is good. It makes the experiment auditable enough that we can ask sharper questions: Did the data change? Did the split change? Did train and test leak into each other? Did the allowed use change? Are two reported scores even answering the same question?
This page is deliberately tool-agnostic. DVC is a useful source for the artifact-versioning pattern, and datasheets are useful for provenance and lifecycle documentation. The teaching contract here is smaller than a full production data governance system: before comparing scores, record the exact data evidence bundle and reject comparisons whose bundle changed or became invalid.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Let be a raw data snapshot, be the transformation code and parameters, be the split manifest, be the schema and annotation assumptions, be the license or use scope, and be the provenance note. A dataset version is the tuple
Here is a collision-resistant hash used as a fingerprint, and means a deterministic serialization. The hash is not the whole governance story. It is the short handle that points back to the inspectable bundle.
Let be a metric contract, be a model, and be the test split named by . For examples in that test split, a simple average score can be written as
Two scores and are cleanly comparable only when the relevant evidence contract is the same: the dataset fingerprint matches, the metric contract matches, and the validity checks pass. If the raw snapshot or split changes, the score may still be useful, but it answers a different question. If the split leaks, provenance is missing, or the use scope is absent, the score should be treated as invalid evidence until the bundle is repaired.
The key mental move is to separate three cases:
- Same version: the bundle fingerprint and validity checks match.
- New version: the bundle changed in an allowed and recorded way.
- Invalid evidence: a required part of the bundle is missing or violates the evaluation contract.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
This witness is intentionally small. It fingerprints a dataset bundle, then classifies candidate changes as same version, new version, or invalid evidence.
import copy, hashlib, json
BASE = {
"raw": "s3://cf-demo/reviews/raw-2026-06-01.csv",
"transform": "clean_v3.py:strip_html+dedupe",
"split": {"train": ["a1", "a2"], "test": ["b1", "b2"]},
"schema": "text,label@v2",
"use_scope": "research-demo-ok",
"provenance": "exported from consented review corpus",
}
def fingerprint(bundle):
payload = json.dumps(bundle, sort_keys=True, separators=(",", ":"))
return hashlib.sha256(payload.encode()).hexdigest()
def valid(bundle):
if not bundle.get("use_scope") or not bundle.get("provenance"):
return False, "missing use scope or provenance"
train = set(bundle["split"].get("train", []))
test = set(bundle["split"].get("test", []))
if train & test:
return False, "train/test split overlap"
return True, "valid"
def classify(old, new):
ok, reason = valid(new)
if not ok:
return "invalid evidence", reason
if fingerprint(old) == fingerprint(new):
return "same version", fingerprint(new)[:12]
return "new version", fingerprint(new)[:12]
cases = {
"rerun": {},
"new raw export": {"raw": "s3://cf-demo/reviews/raw-2026-06-15.csv"},
"license missing": {"use_scope": ""},
"split leak": {"split": {"train": ["a1", "b1"], "test": ["b1", "b2"]}},
}
for name, patch in cases.items():
candidate = copy.deepcopy(BASE)
candidate.update(patch)
print(name, "=>", classify(BASE, candidate))
The witness is not a replacement for a data catalog, a legal review, or a privacy review. It is a compact reproduction habit: the score comparison begins by checking whether the evidence bundle is identical, newly versioned, or invalid.
04
Interactive Demo
Use the authored prediction probe to test the mechanism without a live widget.
Prediction drill: before revealing the answer, label each candidate change as same version, new version, or invalid evidence.
Baseline evidence bundle: raw snapshot raw-2026-06-01.csv; transform clean_v3.py; split manifest with disjoint train and test IDs; schema text,label@v2; use scope research-demo-ok; provenance note consented review corpus.
Candidate A: the model is rerun, but every dataset field is identical.
Candidate B: the raw snapshot changes to raw-2026-06-15.csv, and the change is recorded.
Candidate C: the split manifest puts example b1 in both train and test.
Candidate D: the license or use-scope field is empty.
Reveal:
- Candidate A is same version. A rerun can still differ because of model randomness or infrastructure, but the dataset evidence bundle did not change.
- Candidate B is new version. The comparison may be useful, but it is not the same dataset question.
- Candidate C is invalid evidence. Split overlap means the evaluation contract is broken.
- Candidate D is invalid evidence. A missing use scope makes the result unsuitable as a trustworthy public reproduction artifact.
The sharp habit is to ask this before celebrating a better score: did the model improve, or did the evidence bundle move?
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Dataset versioning pins the data snapshot, transformation, split, schema, license/use scope, and provenance behind each reported result.
Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Dataset Versioning should make visible.
Visual Inquiry
Make the image answer a mathematical question
Dataset versioning pins the data snapshot, transformation, split, schema, license/use scope, and provenance behind each reported result.
Which visible object should carry the first intuition?
Pick the cue that should make Dataset Versioning easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Tool-specific source for versioning data, models, and intermediate artifacts alongside code.
Open sourceSource for documenting dataset motivation, composition, collection, preprocessing, distribution, use, and maintenance.
Open sourceSource for the data-leakage warning that train and test information must not contaminate each other.
Open sourceClaim Review
Dataset versioning pins the data snapshot, transformation, split, schema, license/use scope, and provenance behind each reported result.
Source IDs and witness objects are attached for review; they are not proof by themselves.
dvc-data-versioning, gebru-datasheets, sklearn-data-leakage
Use equation, code, and demo objects to check whether the source support is operational.
The sources jointly motivate versioned artifacts, documented dataset provenance and lifecycle fields, and split/leakage discipline for evaluation.
Sources: DVC Documentation: Data Versioning, Datasheets for Datasets, scikit-learn User Guide: Common pitfalls and recommended practicesThis is a tool-agnostic teaching contract, not a claim that one hash, DVC, or a datasheet alone solves legal, privacy, governance, or production reproducibility needs.The source note has been inspected, but exact source support still needs substantive review.Source support candidates
documentation 2026DVC Documentation: Data VersioningTool-specific source for versioning data, models, and intermediate artifacts alongside code.
paper 2021Datasheets for DatasetsSource for documenting dataset motivation, composition, collection, preprocessing, distribution, use, and maintenance.
documentation 2026scikit-learn User Guide: Common pitfalls and recommended practicesSource for the data-leakage warning that train and test information must not contaminate each other.
Practice Loop
Try the idea before it explains itself
Dataset versioning pins the data snapshot, transformation, split, schema, license/use scope, and provenance behind each reported result.
Before touching the demo, predict one visible change that should happen in Dataset Versioning.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to an exact object
Pick the concept, equation, source, code witness, claim, misconception, or demo state before asking for help. The handoff stays grounded to that object.Open the draft below to save one note and next action in this browser.
Dataset Versioning
What is the smallest example that makes Dataset Versioning click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays locally in this browser for concept:production-ml/dataset-versioning.
- Source ids to inspect: dvc-data-versioning, gebru-datasheets, sklearn-data-leakage
- Definition, prerequisite, and contrast concept links
- The equation or code witness that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Dataset Versioning Object key: concept:production-ml/dataset-versioning Context: Production ML Anchor id: concept/concept-notebook/production-ml/dataset-versioning Open question: What is the smallest example that makes Dataset Versioning click without losing the math? Evidence to inspect: - Source ids to inspect: dvc-data-versioning, gebru-datasheets, sklearn-data-leakage - Definition, prerequisite, and contrast concept links - The equation or code witness that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/production-ml/dataset-versioning
concept:production-ml/dataset-versioning