liveBook · Manning

Dataset reproducibility

As explained in Designing Deep Learning Systems: A guide for software engineers

Dataset reproducibility is the ability to reconstruct or query the same dataset state used at a particular point in a data workflow.

Dataset reproducibility lets a dataset-management service return the exact training examples used before. A training run receives a dataset version string or hash; any team can later use that identifier to fetch the same dataset state. This makes data version tracking part of training reproducibility rather than an optional storage detail. section 2.1.2 section 2.4

Treat the training dataset as static for a model run even while collection and ETL keep it dynamic. Store updates as commits and expose training datasets as versioned snapshots. A useful service separates ingestion, internal storage, and training-data fetching, while keeping API behavior consistent across dataset types. section 2.4 section 2.1.2

A reproducible dataset workflow should:

  • Assign a retrievable version identifier when training data is delivered, so a later run can request identical examples. section 2.1.2
  • Preserve dataset updates as snapshots or commits instead of replacing the only accessible state. section 2.3.1 section 2.4
  • Compare versions with data-diff functionality when troubleshooting changes in model behavior. section 2.1.2
  • Validate schemas on write for typed datasets, preventing incompatible records from polluting a table before downstream reads. section 2.3.1

Delta Lake provides one implementation path for continuously updated training data. Bronze tables retain raw inputs, silver tables hold cleaned and transformed data, and gold tables hold filtered training-ready results. Delta Lake tracks table updates as snapshots, allowing past states to be browsed or restored while batch and streaming inputs continue to arrive. section 2.3.1 section 2.3.1

Querying a past Delta Lake dataset

Use Delta Lake history to inspect prior operations, then read a table with either timestampAsOf or versionAsOf. For example, a read using versionAsOf 12 selects the table state recorded at version 12, allowing a training workflow to recover that historical input rather than whichever data the table contains now. section 2.3.1

Listing 2.12 Delta Lake time travel commands
pathToTable = "/my/sample/text/intent/dataset/A"
 
deltaTable = DeltaTable.forPath(spark, pathToTable)    #1
fullHistoryDF = deltaTable.history()                   #2
lastOperationDF = deltaTable.history(1)                #3
 
 
df = spark.read.format("delta")                        #4
       .option("timestampAsOf", "2021-07-01")          #4
       .load(pathToTable)                              #4
 
df = spark.read.format("delta")                        #5
      .option("versionAsOf", "12")                     #5
      .load(pathToTable)                               #5

The time-travel commands show the operational sequence: open a Delta table, inspect its history, and load a snapshot by timestamp or version. section 2.3.1

For Spark-based deep learning pipelines, Delta Lake can retain the versioned table and Petastorm can convert it into datasets consumable by PyTorch or TensorFlow. This keeps data engineering and model development separable while preserving a fetchable training-data state. Pachyderm offers another versioning-oriented option, using Git-style data versions and container-based pipelines on Kubernetes. section 2.3.1 section 2.4

How Designing Deep Learning Systems: A guide for software engineers covers it

How deep it goes
Defines versioned retrieval and details snapshot-based Delta Lake time travel, without specifying a universal storage design.
Examples
Demonstrates Delta Lake history plus timestampAsOf and versionAsOf reads for recovering earlier table snapshots.
What you can do after
Apply it via Delta Lake time travel to retrieve a prior training-data snapshot by timestamp or version.
How it connects
Connects dataset versioning with model reproducibility, data diff, ETL, schema enforcement, Delta Lake, and Petastorm.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Designing Deep Learning Systems: A guide for software engineers. The section links point to the parts of the book it draws on.