How do you handle model errors in production?
mediumAnswer
- (1) Timeout: enforce max inference time; fallback if exceeded.
- (2) OOM protection: reject oversized inputs.
- (3) Input validation: schema + range checks.
- (4) Fallback model: simpler / cheaper model for edge cases or capacity issues.
- (5) Cached default: last-known-good prediction.
- (6) Log all errors with input for post-hoc analysis.
- (7) Circuit breaker: temporary disable if error rate spikes.
- (8) Graceful degradation over hard failure.
- Product should function even when model doesn't.
Check yourself — multiple choice
- Random
- Timeout + OOM protect + input validation + fallback model + cached default + log errors + circuit breaker + graceful degrade; product functions even when model doesn't
- Just crash
- Not real
Error handling: timeout + validate + fallback + cache + circuit breaker + degrade.
#deployment
Practise MLOps & Data Quality
215 interview questions in this topic.