← Back to the chapter · Previous detail · Next detail →

Technical detail · IoT Machine Learning Fundamentals

Replay the production input contract

The most common deep failure is a mismatch between training and inference. A feature may be calculated with future data during training but only past data during deployment. A label may be available from maintenance logs weeks after the event, while the deployed system needs an immediate warning. A gateway may batch data during training export, while edge inference receives partial windows. These mismatches create optimistic evaluation and fragile field behavior.

A practical contract bundles the model file with the scaler, feature order, units, threshold, supported sensor firmware, and fallback behavior. For example, changing a temperature feature from Celsius to Fahrenheit, dropping a calibration-age field, or moving from complete hourly windows to partial five-minute windows is not a harmless implementation detail. It changes the input distribution and may make the validation result irrelevant. The review should be able to replay a held-out record through the exact production path and explain why the same feature vector, confidence value, and action would be produced. If replay requires a manual spreadsheet step, an undocumented gateway export, or a field that is unavailable during live operation, the inference contract is not yet controlled. That replay evidence is often the fastest way to find hidden train-serve gaps.

← Back to the chapter · Previous detail · Next detail →