Sub topic 1
Why Releasing a New Model Is Different from Releasing Code
A code release usually changes how a system performs a defined task. Tests can check whether the same input still produces the expected output. A model release changes the decision rule itself. The new model may behave differently on inputs that were never included in tests, so production data becomes part of the evaluation.
Prerequisites
This chapter assumes that you understand basic model-serving concepts, common metrics such as accuracy and latency, and simple averages and proportions. You should also be comfortable reading short Python or YAML examples.
A model changes behavior, not only implementation
Suppose an API changes from one JSON parser to another. A test suite can compare outputs for known inputs and expose many regressions. Replacing a fraud model is different. The model may return a different score for thousands of valid requests even though the service remains healthy.
A model release can change:
- Which cases receive a positive or negative decision.
- The distribution of scores and confidence values.
- Latency and resource consumption.
- Business outcomes such as approvals, clicks, or fraud losses.
- The data users send in response to the model's decisions.
The last point creates a feedback loop. A recommendation model changes what users see, which changes what they click, which changes the data collected for a future model. A fraud model may block transactions, so labels for blocked transactions can become harder to observe.
Offline evaluation is necessary but incomplete
An offline evaluation runs a candidate model on historical data. It can compare the candidate with the current model using a fixed test set. This is useful for finding obvious regressions and checking whether the candidate meets a minimum quality bar.
However, historical data may not represent current traffic. The input distribution can change because of seasonality, new products, new users, or changes in upstream systems. This is called data drift. Labels can also be incomplete or delayed. A model that scores well offline can still have poor production latency, unexpected resource use, or harmful effects on a business metric.
The stable model provides an important reference. Production evaluation should compare the candidate with that reference on similar requests, not only compare the candidate with an old benchmark.
Production risk has several dimensions
A release can fail even when its accuracy improves. For example, a candidate might reduce false negatives but exceed the service's latency target. It might improve click-through rate while increasing complaints or reducing long-term retention.
Before release, define the primary outcome and guardrails. A primary outcome answers whether the model creates the intended value. Guardrails limit unacceptable side effects.
| Dimension | Example question |
|---|---|
| Model quality | Does recall improve on relevant cases? |
| System health | Does p95 latency remain below the service limit? |
| Business impact | Does conversion improve without increasing cancellations? |
| Safety and fairness | Does performance remain acceptable across important groups? |
A safe rollout therefore exposes the candidate gradually or observes it without affecting decisions. The release process should make comparison possible, preserve a rollback path, and account for the time required for reliable labels.
Exercise
Why can a candidate model with better offline accuracy still be unsafe to release?
Show answer
Offline data may not match current traffic, and the candidate may cause unacceptable latency, resource use, business effects, or group-specific errors in production.