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
43 practiced

After converting a model to a lower-precision or quantized format (fp16 or int8) for faster inference, some inputs now produce NaN, out-of-range, or systematically different predictions than the original model. Provide a step-by-step debugging plan to localize where in the quantization pipeline the issue is coming from. Propose a safe, staged rollout plan (with tests) for migrating production traffic to the quantized model.

MediumTechnical
50 practiced

You observe a gap between training and validation performance for a model and need to determine whether it is caused by ordinary overfitting or by data leakage. Design an experiment and validation plan that distinguishes the two, what results would point to leakage versus genuine overfitting, and how your conclusion would change if training loss were near zero but validation accuracy were also unstable (not just low) across runs.

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

HardSystem Design
46 practiced

Design a chaos-engineering (failure-injection) plan to test an ML system's resilience: injecting feature corruption, missing upstream data, a spike in a particular label, and delayed inputs. Describe the specific tests you would run, how you would capture and interpret the system's response, the safety controls you would put in place so the experiment can't cause real user harm, and what you would do after a test reveals a real weakness.

MediumTechnical
39 practiced

A model performs well in aggregate but is consistently wrong for a specific, business-relevant slice of the data (for example a particular subpopulation or a narrow input domain). Describe the set of analyses you would run to confirm and localize the issue. Explain how you would distinguish whether the failure is due to sparse data for that slice, a genuinely biased input distribution, or a relationship that only holds within that slice, and what you would try before deciding to build a separate model. Describe briefly how you would present your findings and a remediation plan to a non-technical audience in a short meeting.

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.