Debugging and Testing ML Systems Questions

Finding, diagnosing, and fixing problems in ML code, data, and models, and building tests that catch these problems before they reach users. Covers common ML pitfalls (data leakage, shape mismatches, silent training bugs, mis-specified loss or metrics), root-cause analysis of model regressions and production incidents (accuracy drops, calibration drift, intermittent or hard-to-reproduce failures), distributed-training-specific failures (multi-GPU divergence, intermittent OOM, precision-related instability), and the diagnostic tooling that supports it (reproducibility artifacts, structured logging, instrumentation). Also covers testing ML systems directly: unit tests for data and feature pipelines, validation checks for datasets and features, test oracles and acceptance criteria for probabilistic or non-deterministic model outputs, and integration and regression tests that catch model or pipeline regressions before deployment. Emphasizes the engineering rigor that keeps ML systems correct and maintainable.

HardTechnical
46 practiced

Write a detailed bug report for an intermittent ML training failure that surfaces as a non-deterministic CUDA kernel launch happening only on specific GPU types. Include what timestamps and environment matrix (drivers, CUDA, cuDNN, framework versions) you would capture, minimal steps to reproduce, sample seeds, which logs to attach, an impact assessment, and your recommended next experiment or workaround.

HardTechnical
49 practiced

A new model version passed all pre-deployment tests but shows notable degradation once in production. Walk through a forensic post-deployment incident-response plan: what evidence you would gather (logs, feature snapshots, model versions), how you would compare pre- and post-deployment input distributions and schemas, how you would check for a data-pipeline or feature-transformation change that the pre-deployment tests didn't cover, and what you would change about your test suite so a similar regression is caught next time.

HardSystem Design
53 practiced

An ML pipeline joins historical labels with feature aggregates across several steps; leakage only appears when the pipeline is run end-to-end, not when any single step is inspected in isolation. Propose platform-level design patterns and tooling that would catch this class of leakage systematically: feature-store API semantics for time-travel/point-in-time correctness, versioning and schema guarantees, and retrospective validation you would run against historical predictions.

HardTechnical
45 practiced

For a product feature driven by an ML model that produces probabilistic outputs, propose a testing strategy that balances speed, quality, and cost, spanning from fast pre-merge checks through to production validation. Discuss the cost trade-offs of your recommended retraining and test-execution cadence.

HardTechnical
43 practiced

You scale synchronous distributed training from a small number of GPUs to many, or you enable mixed precision (AMP) and gradient accumulation, and training that was stable before now diverges or intermittently produces NaNs in the backward pass. Enumerate the plausible causes and propose a prioritized diagnostic plan: which single change you would test first, and what you would expect to observe if each cause were the real one.

Unlock Full Question Bank

Get access to all Debugging and Testing ML Systems interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.