Week 8 • Friday

Block 79: Saving & Loading Models

Persist trained models for later use without retraining.

Concepts

Code Examples

See exercise below.

Exercise

Train a model, save it with joblib. Load it in a new script and make predictions. Verify results match. Save and load a full Pipeline (scaler + model) and verify predictions are identical.

Homework

What information besides the model file do you need to save to reproduce a deployment? List 5 things.