InterviewStack.io LogoInterviewStack.io

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

A model's offline evaluation metrics improve over the previous version, but the online experiment shows no lift, or even a regression, on the actual business metric (for example, revenue, watch-time, or click-through rate). Describe a systematic checklist to reconcile the discrepancy, covering both the data pipeline feeding each metric and the model's behavior itself. Then describe how you would communicate the investigation's status and findings to a stakeholder who is skeptical that the new model is actually worse.

MediumTechnical
72 practiced

Draft the artifact checklist an ML-specific production-outage postmortem needs beyond a generic incident postmortem template: which model and dataset versions, experiment IDs, feature-store snapshots, and reproduction steps should be captured so the incident can actually be reproduced and understood later, not just narrated. Explain why each item matters specifically for an ML system rather than a generic service outage.

EasyTechnical
46 practiced

Define smoke tests, regression tests, and integration tests specifically for machine learning models in production. For each type, give a realistic example test case (for example, a simple inference sanity check, a model-quality regression test against a golden dataset, or a full pipeline integration test) and explain when each should run in an ML CI/CD pipeline.

HardTechnical
53 practiced

Design a test suite specifically to ensure numerically stable training when switching to mixed-precision (FP16) or quantized training. Include checks for NaNs and Infs, gradient underflow or overflow, correctness of dynamic loss-scaling, and an acceptable-accuracy-delta check comparing the mixed-precision model's final accuracy to the full-precision baseline. Describe the automated thresholds you would set and what remediation each failing check should trigger.

MediumTechnical
42 practiced

Describe a safe strategy for managing feature-schema migrations in a production ML system, so a new schema version can roll out without breaking either model serving or training. Include how you would version schemas, how you would write and test transformation functions between versions, and what contract tests would give you confidence the migration didn't silently change any feature's meaning.

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.