Think Build Implement Repeat
London, UK +44 7367 067226
WhatsApp FOLLOW f in X
Python & Django

From Notebook to Running Service

Last updated:

The notebook is the easy part

Training a model that performs well on historical data is a well-understood exercise. Running it as a dependable component of a business system is a different discipline entirely.

The gap between a promising notebook and a reliable service is where most business machine learning projects stall, and it is almost entirely engineering rather than data science.

What production requires

  1. Versioned models, with the training data and code recorded
  2. Reproducible predictions — the same input gives the same output
  3. Input validation, because production data differs from training data
  4. Monitoring for drift in inputs and in outputs
  5. A fallback for when the model is unavailable or unconfident

Drift is the thing that catches people

A model trained on last year's data becomes less accurate as the world changes. Nothing errors; the predictions simply get worse, and nobody notices until someone questions a result.

  • Monitor the distribution of inputs against training data
  • Monitor the distribution of predictions
  • Track accuracy against actual outcomes where they become known
  • Set a retraining trigger and a schedule

Feature consistency

The features computed at prediction time must match those computed at training time exactly. Divergence between the two is one of the most common and most subtle production failures.

Share the feature computation code between training and serving rather than reimplementing it.

Be honest about whether it is needed

ProblemFrequently better solved by
Classification with clear rulesRules
Small data volumeHuman judgement
Forecasting stable seasonalityStatistical methods
Text understandingA language model, not custom training
Genuine pattern recognition at volumeMachine learning

A great deal of what is proposed as machine learning is better solved by simpler methods, and we say so reasonably often.

Frequently asked questions

How much data do we need?

It depends entirely on the problem. Thousands of examples for simple classification; considerably more for anything nuanced.

How often should models be retrained?

When drift monitoring indicates it, or on a schedule if the domain changes steadily. Not never, which is the common default.

Do we need a data scientist?

For custom model training, probably. For most business AI, which is retrieval and language models, no.

What if the model is wrong?

Confidence thresholds and a human path, as with any AI system. A model with no fallback is a single point of failure.

Keep reading

Model that works in a notebook?

Production is a different piece of work. Happy to scope what would be needed.

Book a free 30-minute call Get a project estimate WhatsApp us

Related services

What we build for problems like this one

Custom Software DevelopmentWeb DevelopmentMachine Learning