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.

EasyTechnical
73 practiced

A large model-training run fails with a GPU out-of-memory error when you increase the batch size. List the practical mitigation strategies available to you, and describe the trade-off each one makes (extra compute time, implementation complexity, or a change in effective batch-size semantics).

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.

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
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.

EasyTechnical
53 practiced

Create a prioritized checklist of automated tests and validations you would include in ML continuous-integration for a production model, ordered from the earliest pipeline stage to the latest. For each item, explain briefly why it matters and which common production failure it prevents.

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.