The Universal Workflow of Machine Learning

From Problem Definition to Production MLOps

Success in AI isn't just about the model—it's about the **process**. Whether you're building a diagnostic tool or a perception stack, you need a repeatable workflow to manage data, scale training, and monitor production performance.

In this chapter, we explore the modern **MLOps** lifecycle, focusing on Data Flywheels, Concept Drift, and the ethics of deployment in safety-critical systems.

Step 1: Defining the Task

The first step is framing the problem. What are the inputs and outputs? What is the cost of a mistake? In an Autonomous Vehicle, a **False Negative** (missing a pedestrian) is much more costly than a **False Positive** (braking for a shadow). Choosing the right metric—like **Recall**—is part of the framing.

PythonRuns entirely in your browser — nothing is sent to a server.

Step 2: Developing the Model

Development starts with a **Baseline**—the simplest possible model that beats a common-sense hurdle (like guessing the most frequent class). From there, we scale up to a model with "Capacity" to solve the task, and then we regularize. In Medical AI, a baseline might be "always predict the patient has no disease"—your model *must* beat this significantly to be useful.

PythonRuns entirely in your browser — nothing is sent to a server.

Step 3: Deploying and Monitoring

Deployment isn't the end. Models in the wild encounter **Concept Drift**—the world changes, but the model doesn't. An AV vision system trained in sunny California may fail in a snowy German winter. We must monitor confidence scores and data distributions to know when to retrain.

PythonRuns entirely in your browser — nothing is sent to a server.

Practice Questions

Question 1

In the AV Braking scenario, why might 'Recall' be prioritized over 'Precision'?

  • Precision is too hard to calculate for cars
  • It is safer to occasionally brake for a 'shadow' (False Positive) than to miss a 'pedestrian' (False Negative)
  • Recall makes the engine run faster
  • AVs only use Recall

Question 2

What is 'Concept Drift' in the context of model deployment?

  • When the model file gets too large to fit on a server
  • When the relationship between input data and output targets changes over time in the real world
  • When the model starts taking too long to predict
  • When the code gets deleted by accident