Build and deploy an ML REST API in 5 steps
Aug 11, 2023
Here is a hands-on FREE tutorial on MLOps that will help you grow as an ML engineer and go beyond notebooks.
Tutorial materials 📚🎬
All the code is open-source and available in this repository
➡️ Give it a star ⭐ on GitHub to support my workAll the video lessons are on my Youtube channel
➡️ Subscribe to my channel to be notified when the next lesson is out.
This is what you will learn
You will learn to
-
train an ML model prototype through careful experimentation, using CometML.
-
deploy the model as a REST API, with Cerebrium.
-
automate safe deployments, using GitHub actions and Comet ML Model Registry [COMING SOON]

Without further ado, let's get to work!
1. Set up your development environment
Learn to
-
quickly bootstrap a project structure
-
manage Python environments and dependencies with Python Poetry
-
organize your code for maximum productivity
2. Generate training data
-
In real-world projects there is no training dataset waiting for you.
-
You need to generate it, starting from raw data, and ending up with clean pairs of (features, target).
This is what you will learn in this lecture.
3. Create a baseline model (without ML!)
-
Before training any ML model you need to estimate a baseline performance, using a simple rule-based model.
-
Simple historical values, or moving averages often work well.
4. Train ML models
-
Building a good ML model is a very experimental process.
-
Integrate your training script with a serverless experiment tracker like CometML so you experiment faster in a more disciplined way.
5. Deploy your model as a Serverless REST API
-
Un-deployed models generate 0 business value.
-
Make your model predictions available by deploying the model as a Serverless REST API using Cerebrium
What’s coming next?
In the following weeks I will release a few more videos, where you will learn how to automate deployments following CI/CD best-practices.