← all repositories
mrdbourke/cs329s-ml-deployment-tutorial

Stanford courseware that actually teaches you to ship ML models

A soup-to-nuts tutorial for getting a TensorFlow image classifier off your laptop and onto Google Cloud—complete with the inevitable credential errors.

620 stars Jupyter Notebook Inference · ServingLearning
cs329s-ml-deployment-tutorial
Velocity · 7d
+0.3
★ / day
Trend
steady
star history

What it does

This repo holds the companion code for Stanford’s CS329s course: a step-by-step guide to deploying a food-image classifier (dubbed “Food Vision 🍔👁”) using Streamlit, Docker, and Google Cloud Platform. You train a model on the Food101 dataset, containerize a Streamlit frontend, host the model on Google’s AI Platform, and finally push everything live via App Engine.

The interesting bit

The tutorial leans into friction rather than pretending deployment is frictionless. It deliberately walks you into a GCP credential error, then shows exactly how to dig out: service accounts, IAM roles, JSON keys, the whole bureaucratic waltz. For anyone who’s watched a deployment tutorial skip the “why is this 403-ing” step, this is cathartic.

Key highlights

  • End-to-end pipeline: Jupyter notebook training → SavedModel export → AI Platform hosting → Streamlit frontend → App Engine deployment
  • Heavy use of gcloud CLI and Makefile shortcuts (make gcloud-deploy) rather than endless console clicking
  • Explicit warnings about GCP costs—twice—plus instructions to nuke resources when done
  • Docker containerization handled transparently via provided Dockerfile, with explanation of the image-vs-container distinction
  • Model serving through Google AI Platform Prediction (the older service, not Vertex AI)

Caveats

  • Built around Google AI Platform Prediction, which Google has largely superseded with Vertex AI; the console screenshots and API paths may drift
  • Requires active GCP billing (or the $300 new-user credit) and comfort with IAM configuration
  • TensorFlow-centric; PyTorch users are told to “do what you need” with no further guidance

Verdict

Worth a Saturday if you’re a data scientist who’s trained models but never shipped one, or if you need to onboard someone to GCP’s ML serving stack. Skip it if you’re already comfortable with Vertex AI, or if your infrastructure lives on AWS/Azure and you’re not looking to migrate.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.