Module 14 · Lesson 3 of 15Pro
Serving a model behind an API
- Level
- Intermediate
- Topic
- Deploying ML models
- Reading time
- 18 min
When you finish this page you can
- Build a model server that loads its model once at start-up, checks every request against a schema and returns a score with the model version.
- Explain why a CPU-heavy predict call belongs in a plain def handler, and why parallel work needs processes rather than threads in Python.
- Size the processes, threads and containers for a peak load without starting more threads than the machine has cores.
- Plan what the caller does when the model is slow or down: a timeout, a fast refusal and a fallback.
Builds on 2 lessons
Start with lesson 114 minVideo lesson · coming soon
A 3 ms prediction that took 70 ms
Our biggest sale ever · Black Friday
Flat 50% Off
Pro
Continue reading
Unlock every course, now and later
- System Design, live
- AI Engineering, live
- Data Engineering, live
- Machine Learning Engineering, live
- Inference Engineering, coming soon
- AI Research, coming soon
- Performance Engineering, coming soon
- Agent & Harness Engineering, coming soon
- LLM Fine-tuning, coming soon
- LLM Pre-training & Post-training, coming soon
- Reinforcement Learning, coming soon
- AI Infrastructure & Platform Engineering, coming soon
- AI Evaluation & Safety, coming soon
- Forward Deployed Engineering, coming soon
- Cloud Computing, coming soon
- DevOps, coming soon
50% off · Annual and Lifetime
BLACKFRIDAY50Applied at checkout
View all plansAlready Pro? Sign in