Free courses
MLOpsBeginnerFree
Track, Serve, and Monitor a Model After the Notebook
Take a model you trained in a notebook and manage its life after training. You will track experiments, serve predictions through an API, and monitor performance in a small working system.
5 lessons 36 minNo account needed
Start lesson 1What you will learn
- Track training runs and compare their results with a local experiment tracker.
- Package and register a trained model so it can be loaded by other programs.
- Serve predictions from a model through a local HTTP API.
- Monitor a served model's inputs and outputs for changes in data or performance.
- Build a simple end-to-end workflow that trains, serves, and checks a model locally.
Before you start
- Train a simple classification model in Python using scikit-learn.
- Use the command line to run Python scripts and install packages.
- Understand train/test split and basic evaluation metrics such as accuracy.
- Write Python functions and work with dictionaries and files.
Lessons
- Lesson 1: Move Training Code into a Script and Track an ExperimentExtract your notebook training code into a reusable script and log a training run with MLflow, a local experiment tracker.7 min
- Lesson 2: Package and Register the Trained ModelSave the trained model in a standard format and register it in MLflow's model registry so other programs can load it by name and version.7 min
- Lesson 3: Serve the Model with a Local HTTP APICreate a small web service that loads the registered model and returns predictions when it receives a POST request at `http://localhost:5000/predict`.7 min
- Lesson 4: Monitor Inputs, Outputs, and PerformanceAdd logging to the prediction service to record each request and response, then compute simple drift and accuracy checks on new data.6 min
- Lesson 5: Put It Together: Train, Serve, and Check in One WorkflowCombine the script, registry, service, and monitoring into a single local workflow and test it with a batch of new data to trigger a retraining alert.9 min