datarekha
Infrastructure June 10, 2026

Most ML failures are silent: the case for data contracts

An ML pipeline rarely crashes when the data goes wrong — it keeps serving confidently wrong predictions. Data contracts make a schema or semantics breach fail loudly at the source, before it poisons a retraining job.

6 min read · by datarekha · mlopsdata-contractsdata-qualityreliability

The most expensive ML incidents don’t announce themselves. A crashed pipeline pages someone in minutes. But when an upstream team renames a column, starts sending nulls, or quietly switches a field from dollars to cents, the model doesn’t error — it keeps serving predictions, now subtly wrong, and nobody notices until the business metrics sag weeks later. This is the defining failure mode of production ML, and in 2026 the standard defense has a name: the data contract.

Why ML eats bad data without complaining

The trouble is that a model can’t tell “corrupt data” from “the world changed.” It faithfully maps whatever arrives to a prediction. As one engineering write-up puts it, when the downstream consumer of data is an automated ML system rather than a human reading a report, a schema or freshness change can fail silently and degrade predictions — which is exactly why you need to validate data before it reaches the model rather than discovering the problem in a dashboard later.

That urgency has grown as more data flows straight into retraining loops. The failure everyone now fears is the silent one: the producer redefines a column, dashboards still look fine, but a retraining job is quietly poisoned.

A contract is schema plus semantics, enforced

A data contract goes beyond a schema definition. Soda describes it as an enforceable agreement between data producers and data consumers that specifies how data should be structured, validated, and governed as it moves through a pipeline. The key word is enforceable — the contract is checked every time data flows, so a violation blocks the pipeline at the source. The responsibilities are explicit, too: consumers specify the guarantees they depend on and producers take responsibility for meeting them, with contract validation acting as a control point before data is released.

The tools that enforce it

You don’t hand-roll this in production. Four tools cover most needs:

The mindset shift is to treat incoming data with the same rigor as code. A contract that fails the build on a bad batch is worth far more than a dashboard you check after the damage is done.

Skip to content