# Inference schema drift

A model-serving process is healthy, but its producer receives an error instead of a prediction. Investigate the mismatch between the request and the model's feature contract.

The exercise uses a deliberately simple illustrative logistic model with fixed coefficients and synthetic measurements. Its output is for troubleshooting practice, not a trained or validated prediction.

## Before you begin

You need Bash, Python 3, Docker and Docker Compose on a disposable local machine. The first run may download a Python container image. No cloud account, real data or host port is used. Docker still consumes local disk, compute and network bandwidth, and a Docker host in the cloud may incur charges.

The exercise creates Compose project `breakfix-mlops-01` and mounts this lab directory read-only inside its container. Do not reuse the project name for another workload. Your changes to the payload remain on the host after teardown; re-extract the archive to reset the exercise.

## Start the incident

Run `./setup.sh` from this directory. The script starts the service and confirms the prediction request is rejected. Reproduce the request with `docker compose -p breakfix-mlops-01 exec inference python /lab/client.py`; inspect the error, model artifact and input payload.

## Verify and clean up

After correcting the request contract without changing the model or measurements, run `./verify.sh`. It checks that the original values reach the model and the prediction matches the model's calculation. Run `./teardown.sh` to remove the lab container and network. Setup refuses to reuse an existing project, and teardown refuses containers belonging to a different directory.
