The work around a model that decides whether it works in production. The course covers missing values, honest splits, categorical encoding without leakage, drift monitoring, quantisation, efficient data pipelines, and checkpoints that let a run resume exactly.
Before you start
This topic uses ideas from Machine Learning.
01
Most models cannot take missing values, so they are filled in first. Fit the fill values on the training data only, and apply the same values to new data.
Now try it
02
A model must be scored on data it never saw. A stratified split keeps the class shares the same in every part, which matters when a class is rare.
03
Target encoding replaces a category with the mean target of that category. Without smoothing and out-of-fold fitting, it leaks the label into the features.
Now try it
04
The data a model sees in production changes over time. The KS statistic and the population stability index compare a feature's live distribution with its training distribution.
05
Quantisation stores weights and activations as small integers with a scale, which makes a model smaller and faster. The scale sets the trade between range and precision.
Now try it
06
A Dataset gives single examples, a sampler chooses their order, and a collate function joins them into a batch. Bucketing sequences by length removes most of the padding.
Now try it
07
A checkpoint must hold the model, optimiser and scheduler state and the random state, so that a resumed run is the same as one that never stopped. Save state dicts, so that the file loads safely.
Now try it