Machine learning with football · Chapter 11 · Production ML systems

Monitoring pipelines

Once it is live, watch the data, the slices, the model's age and anything that leaks the answer.

Estimated time: 15 minutes · page 6 of 8

Watch it once it's live

A live model needs watching, and most of what you watch is the data. A data schema spells out what raw data must look like, such as goals between 0 and 15 or a club from the known list. Every new batch is checked against it. Engineered features get their own checks, for instance that z-scored features really average 0.

The board reads this site's own update log, the same one behind its data updates page, and shows how long ago each source last changed. It also shows the model age, how long since the table it learned from was updated. A model fed stale data gives stale predictions, however good it is.

Slices and leaks

A model with a good average can still fail on part of the data. The board scores the goals model on slices, such as matches between two bottom-third clubs or draws, next to the whole season. Draws come out worst because the model expects goals.

Watch for label leakage too: a feature that quietly contains the answer, or isn't known at prediction time. Shots in the match predict goals in the match beautifully, and are useless before kickoff. Test metrics that look too good are the usual sign.

Google's golden rule: training and serving should mirror each other as closely as possible. Also log enough to track which version of the code, the model and the data made each prediction.

Check yourself

A model predicts tonight's total goals and uses "shots in the match" as a feature. It scores brilliantly in testing. What is wrong?
Overall the model is fine, but it is poor on matches involving promoted clubs. How would you catch that?

Leagues