What automated checks would you put on data entering a training pipeline and a serving path?
Answer
Model answer, written in a candidate's voice
In short
- Validate the contract at the boundary: schema, types, required fields, enums, ranges, key uniqueness and null rates.
- Check volume and freshness against expected cadence and an approved baseline.
- Compare distributions to a reference window, not just current-period averages.
- Separate fail-fast hard failures from warn-level soft drift.
- Route alerts to named data/pipeline owners with severity and runbook.
- Quarantine bad partitions/batches while keeping good data flowing.
- Training: block bad batches and require sign-off before retrain; serving: fail fast or degrade safely.
In full
I would put contract checks at the entry point: schema and types, required fields, enums, ranges, key uniqueness, and null rates, so malformed or impossible records cannot silently enter either path. I would also monitor volume and freshness against the expected cadence and an approved reference, and compare distributions to that reference rather than to the previous window, so shifts in feature mix, label balance, or missing segments are visible. Hard failures—broken schema, duplicate keys, impossible values, or a partition that cannot be trusted—should fail fast and quarantine the bad partition or batch; softer drift should warn, not block, but still page the right owner. Alerts should route to the data/pipeline owner with severity and a runbook, and the quarantine should preserve evidence and allow replay or backfill after the fix. For training, I would block the bad batch and require sign-off before retraining; for serving, I would fail fast or degrade to a safe fallback rather than silently serving bad features.
What a strong answer covers
- Schema and types; null rates; ranges and enumerations; uniqueness and keys.
- Volume and freshness; distribution drift versus a reference.
- Fail-fast vs warn thresholds, with ownership and alert routing.
- Quarantine bad partitions.
Common mistakes
- checks without owners, so alerts get ignored
- blocking every pipeline on noisy checks.