ML in Practice — Lightweight MLOps
Back to Serving and Deployment

Batch vs Online Inference

Two serving patterns. The wrong choice causes 90% of avoidable infrastructure pain. FIND_VIDEO: search 'batch vs online inference machine learning' — recommended channel: Made with ML / Chip Huyen. Aim for 10 min or under.

4 minutesVideo LessonPDF notes
🎯 Free Guest Mode: You are learning for free. Sign in to save your completion progress and quiz answers.
Loading progress...

Key moments

  1. Batch Prediction Fundamentals — Scheduled batch jobs operate asynchronously for latency-insensitive workloads like customer churn.
  2. Real-Time Recommender Systems — Session-aware recommendations require immediate on-demand inference before users exit the platform.
  3. Dynamic Pricing and Market Balancing — Live market balancing and fraud detection require low-latency inference on real-time signals.
  4. Inference Cost Optimization — Precomputing predictions across full user bases causes massive compute waste when active engagement is low.
PDF notes

Frequently asked questions

When is batch inference preferable to online inference?

Batch inference is ideal for high-volume, latency-insensitive workloads where predictions do not change based on real-time interactions, such as daily churn or weekly risk scoring.

What is the Batch Precomputation Fallacy?

It is the mistaken belief that precomputing predictions for all users is cost-effective, ignoring that computing scores for inactive users wastes infrastructure budget.

Why is dynamic pricing unsuitable for batch inference?

Dynamic pricing relies on highly volatile, transient market signals like immediate rider demand and driver availability that cannot be captured in delayed batch runs.

How was this lesson?

Your feedback helps us refine explanations and catch bugs.