Cloud

Cloud & Deployment

Kubernetes, secure data integration, active learning and the apps that put a model in front of the people who need it - and feed what they see back into the next one.

A model that only runs on the laptop it was trained on is a result, not a system. The work that turns one into the other is unglamorous and it is most of the job: somewhere to run it that survives a traffic spike, a path for data to reach it that does not involve anyone emailing a spreadsheet, a way for the people who use it to say when it is wrong, and a route for that correction to reach the next version.

  1. 1

    Data

    Collected, validated and versioned, so a training set can be reproduced a year from now.

  2. 2

    Model

    Trained and evaluated against a held-out set, with the uncertainty of each prediction as a first-class output.

  3. 3

    Deployment

    Containerised and served on Kubernetes, scaled to the load, versioned so a bad release can be rolled back.

  4. 4

    Use

    Reached from a web app, a phone in the field, a desktop tool or another service over an API.

Back to step one. Predictions the model was least certain about, corrections from the people using it, and anything new the sensors saw all land back in the same store the next training run reads.

The model lifecycle: data collection, training, deployment, and use, with feedback from use returning to data collection.

Running models on Kubernetes

Inference is spiky. A quality-control model sees nothing overnight and everything at shift change; a screening run is idle for a week and then wants forty GPUs for an afternoon. Kubernetes handles that shape well, which is why we default to it - on GKE, or on whichever cluster you already run.

Containerised, reproducible

The model, its dependencies and its preprocessing ship as one image with a version you can point at. No "it worked on the training machine".

Scaled to the load

Horizontal autoscaling on request volume or queue depth, separate GPU node pools for the work that needs them, and scale-to-zero for endpoints that are idle most of the week.

Safe releases

Blue/green or canary rollout, health and drift checks in front of the switch, and a rollback that is one command rather than an evening.

Batch and stream

Real-time endpoints for the interactive cases, queued batch jobs for the overnight sweep across everything that arrived that day.

Observable

Latency, throughput, cost and - the one people forget - the distribution of the inputs, so you find out that the camera was replaced before the accuracy report does.

Costed

Spot and preemptible nodes where the work can tolerate interruption, right-sized requests, and a bill you can attribute to a workload.

Security is part of the architecture, not a step at the end

Scientific and industrial data is usually the most sensitive thing a company owns - process parameters, unpublished results, patient records. The infrastructure has to assume that.

  • Isolation by default. Private clusters, no public endpoints on anything that does not need one, network policy between workloads rather than a flat namespace.
  • Least privilege. Workload identity instead of long-lived keys, scoped service accounts, secrets in a managed store and never in an image or a repository.
  • Auditability. Who called the model, with what, and what it answered - retained where that matters for review or regulation.
  • Data residency. EU-region storage and processing where that is a requirement, and a clear answer about where every copy lives.
  • Supply chain. Pinned dependencies, image scanning, and a base image that gets rebuilt rather than pinned to 2021.

Integration with your data

The most common reason a good model quietly stops being used is that nobody rebuilt the path that fed it. Deployment and data plumbing are the same project.

We build the collection and validation side too: ingesting from instruments, databases, object storage or an existing warehouse; validating on arrival so a schema change surfaces as an alert rather than a silent accuracy drop months later; and making sure the transformations applied at inference are the same ones applied during training, because when they diverge the failure is subtle and expensive.

Where a database is the right home for it, the model's outputs go back in alongside the inputs - predictions, confidence, model version - so the record of what was decided is queryable rather than living in a log file.

Automated processing pipelines

Almost none of this is a single job. Between an instrument writing a file and someone reading a number there is a chain of steps, and every one of them is a place where things silently stop happening. The chain is worth building as one orchestrated pipeline rather than as a folder of scripts and a cron entry nobody remembers writing.

  1. 1

    Ingest

    From instruments, databases, object storage or an existing warehouse - on a schedule, or when something arrives.

  2. 2

    Validate

    Schema, ranges, completeness. A row that fails is rejected and raises an alert rather than quietly passing through.

  3. 3

    Transform

    The same code path that will run at inference time, so training and serving cannot drift apart.

  4. 4

    Store

    Versioned, with the raw input kept alongside the derived form - because the next question is always one the current transform throws away.

  5. 5

    Run

    Scoring, aggregation, retraining - whatever this pipeline exists to do.

  6. 6

    Publish

    To a database, a dashboard, an API or a report, with provenance attached to every figure.

What separates a pipeline from a scheduled script is mostly what happens when something goes wrong:

Scheduled and event-driven

Nightly sweeps where that fits, and triggered runs where it does not - a new file landing in a bucket, a message on a queue, a row appearing in a table.

Idempotent and re-runnable

Running a step twice produces the same result as running it once. That is what makes a retry safe, and a retry that is not safe is not a retry.

Backfills

When a transform changes or a bug is found, the last two years can be reprocessed with the new code - as a normal operation, not an incident.

Lineage

Every output traces back to the inputs, the code version and the parameters that produced it. When a number is questioned six months later, that question is answerable.

Failure that is visible

A step that fails alerts, retries with backoff, and stops the steps downstream of it. Silent partial success is the expensive failure mode, not the loud one.

Tested like code

Data contracts and expectations checked in CI, so a change to a transform has to pass the same bar as a change to the application around it.

The same machinery runs the training side. A retrain is a pipeline: pull the current labelled set, train, evaluate against the incumbent on a held-out set, and register the candidate - with promotion to production a deliberate step rather than an automatic one.

Active learning: the deployment improves the model

A deployed model generates the most valuable training data you will ever get, and most deployments throw it away.

Because our models carry uncertainty rather than just a prediction, we can rank incoming cases by how unsure the model was about them. Those are exactly the cases worth a human's attention - and exactly the labels that improve the next version most per hour of expert time. The loop is straightforward once it exists:

  1. The model flags the cases it found hardest, instead of an operator sampling at random.
  2. Someone who knows the domain resolves them, in the same tool they were already using.
  3. Those resolutions land in the training store with provenance attached.
  4. Retraining runs on a schedule or on a trigger, and the candidate is evaluated against the current model before anything is promoted.

Alongside it, drift monitoring watches whether today's inputs still look like the ones the model was trained on - which is what tells you a retrain is needed before performance degrades enough for someone to complain.

Applications people actually use

An API is only useful to a system. When the user is a person - an operator on a line, a researcher at a bench, a technician in a field - the model needs a front end, and often one that works where the network does not.

Android & iOS

Cross-platform, so the experience does not depend on which phone someone was issued. Camera capture, on-device inference where latency or connectivity demands it, and a sync queue for everything recorded while offline.

Desktop tools

For the workflows that live next to an instrument or a large local dataset, where uploading everything to review it is not realistic.

Web

Dashboards, review queues and internal tools - the interfaces where the uncertain cases get resolved and the labels come from.

The point of building these ourselves is the return path. An app that shows a prediction is a demo; an app where the user can say "no, that one is a crack, not a scratch" and have it reach the training set is part of the system. Every correction, every new observation and every image the model has not seen before flows back into the same store the next training run reads from.

Where to go next