Skip to content

Deploying AI Models for Real Users

Serve the model that you trained in Machine Learning to real users. Package it with its contract, choose batch, online or asynchronous serving, build and measure the prediction service, and release a new version with a tested way back.

Read every lesson as a guest, or sign in to enroll and track your progress.

What you'll learn

By the end of this course, you will be able to:

  • Package training artifacts with inference contracts.
  • Choose batch or online serving.
  • Measure prediction latency and capacity.
  • Release and roll back model versions safely.

About this course

A trained model is a file. It helps nobody until another program can send it a ticket, a loan application or a patient record and get an answer back: fast enough, every time, and the same answer that the model gave in training. That last step is called serving, and it is where many good models fail.

In this course, you serve the ticket escalation model that you trained in Machine Learning: From Problem to Reliable Model. First you write down exactly what the model accepts and returns, and you package it so that nothing can change it on the way. Then you choose how predictions should reach the help desk: a nightly file, an answer to each new ticket, or a job that runs in the background.

You build the prediction service with FastAPI, the same way as the API in Build and Deploy Your First API, and you prove that it gives the same scores as training. You put it in a container with CPU and memory limits, and you measure how fast it answers and how many requests it can take. Then you release a new model version. First it runs in shadow, where it scores real tickets but nobody sees its answers, and you decide with evidence whether it may go live. When a faulty version gets through, you roll back and check that everything works again.

Every number in the lessons was measured on a real run, and every lesson shows a common mistake: what you see, why it happens and how to recover. Diagrams and interactive charts carry the main ideas, so the text stays short.

Before you start

You completed Machine Learning, Build and Deploy Your First API, and Docker and Cloud Essentials for AI Developers, or you can already train a scikit-learn pipeline and save it, build a FastAPI service with tests, and build and run a container image with Docker Compose. You do not need a GPU or a cloud account; every exercise runs on your computer.

Courses to take first: Machine Learning: From Problem to Reliable Model, Build and Deploy Your First API, Docker and Cloud Essentials for AI Developers.

Who this is for

People who trained a model, as in Machine Learning, and built and containerized an API, as in Build and Deploy Your First API and Docker and Cloud Essentials. A model helps nobody until a program can ask it for a prediction, safely and fast enough. This course closes that gap.

How we made this course

Experienced AI practitioners designed this course. AI helped us draft the content; people chose the teaching approach and the examples, and reviewed every lesson. The outputs that you see are the actual results of running the code. How we make our courses

Inside the course

Module 2Choose a serving pattern

3 lessons

Choose how predictions reach the people who use them. Score a whole file on a schedule, answer one request at a time within a time budget, or accept a large job now and return the result later, and plan what to do when each one fails.

  1. Batch inference40 min
  2. Online inference35 min
  3. Asynchronous inference45 min

Module 3Build the prediction service

3 lessons

Build the prediction service. Load the model once at start-up, answer validated requests with the model version in every answer, and prove with parity tests that the service gives the same scores as training.

  1. Load and initialize40 min
  2. Connect the API40 min
  3. Check parity40 min

Module 5Release, monitor and recover

3 lessons

Release a new model version safely. Run it in shadow next to the live model and decide with evidence, watch the model's health signals, and when a faulty version gets through, roll back to the known-good one and check the contract again.

  1. Version and rollout45 min
  2. Monitor model health45 min
  3. Rollback and retirement45 min

Final module · choose at least oneCase studies

3 case studies

Three end-to-end case studies on real data, as projects that you download and run in VS Code. Score credit default in batch and online, release a new house-price model, and score hospital readmissions with queued jobs. Complete at least one for the certificate; each one is a portfolio piece.

Complete at least one case study for the certificate. The others are optional. What each one covers

  1. Score credit default in batch and online180 min
  2. Release a new house-price model180 min
  3. Score hospital readmissions asynchronously180 min

After the case studiesFinal assignment

Use every module in one practice project. You collect evidence, and check it against the course outcomes.

  1. Final assignment120 min

Case studies

Realistic projects from start to finish, on real data, with every output explained. Each one makes a portfolio piece. Complete at least one for the certificate; the others are optional.

  1. Score credit default in batch and online3 hr

    Serve one credit-default artifact two ways, a monthly batch-scoring job and an online endpoint, and prove they give the same scores.

  2. Release a new house-price model3 hr

    Release a retrained house-price model behind the house-price API from the API course: shadow it, compare it on real traffic, promote it, and roll it back.

  3. Score hospital readmissions asynchronously3 hr

    Accept a large discharge file as a queued job, score it in the background, and let the caller fetch the results later.

Reviews

Loading the reviews…

    Took this course? Sign in to review it. Learners can write a review after they complete 25% of the lessons.

    Share this course