Real-time inference services
Go services that score a full candidate list in one call and run live experiments between model versions.
Portfolio · Production machine learning
We build and run the machine learning that decides inside a product: which driver gets the ride, what a pricing change really did, which model version goes live this week.
One ride, six candidates, six probabilities. Scores are the sample response documented for the inference service.
Capabilities
Go services that score a full candidate list in one call and run live experiments between model versions.
Event consumers that turn a live ride stream into behavioural features, with idempotent writes and bounded concurrency.
Weekly retraining, GPU jobs on Kubernetes, experiment tracking, and immutable model images with one-click rollback.
Counterfactual forecasting from donor cities, switchback experiments, and leakage guards that fail the build.
Self-hosted MLOps on OpenShift: object storage, tracking, Redis with Sentinel, Spark on Kubernetes, autoscaling.
Geospatial demand analysis on H3 hexagons, surge-conversion modelling and SHAP explainability for incentives.
Case studies
Built for one client over two and a half years. The model needs the features, the features need the pipeline, the experiments need the release system, and the measurement says whether any of it worked.
Every offer the platform sends is scored by a neural network that predicts whether the driver will accept and complete it. One model per city, retrained every week.
Roughly one offer in twenty ends in a completed ride, so the signal lives in driver behaviour: recent accepts, this week's income, preferred distances, familiar destinations. Features are built in Spark from windows that end the moment before each offer, so nothing from the future leaks into training. A run is promoted only if it clears a gate on PR-AUC, loss and F1.
Fewer, better features each generation: from raw weekly counters to recency, distance mix and district-level acceptance rates.
19 cities, two model families, 2-hour slots staggered across the week so training never competes for the same GPU. Schedule pattern
Dispatch gives the model between 300 milliseconds and one second to answer for a whole list of drivers. We built the service that answers, and the stream that keeps its features fresh.
One request per ride: price, distance, destination and every candidate driver. The gateway fetches precomputed driver features from Redis in two batched reads, adds ride context, and calls the city's TensorFlow model. A second service consumes ride events from NATS JetStream and keeps about forty behavioural features per driver current, with a six-hour TTL.
Sample request and response from the service documentation, 18 candidates, top 10 shown. The legacy score and the model disagree about who to offer to first.
All three run per city from configuration. Version-against-version tests rolled out across eight cities.
A git tag is the release. Everything between a trained model and a serving pod is automated, and rolling back is one step.
The pipeline pulls each city's SavedModel from object storage, lays out the model tree, bakes every version into one TensorFlow Serving image and deploys it with Helm: rolling updates, 3 to 30 pods on CPU autoscaling, routes to both datacenters. Around it we ran the team's self-hosted MLOps platform on OpenShift.
Each dot is a git tag that became a serving image. Dates from the release repository.
17 city models, 32 versions in one container. Several versions stay live per city so experiments can compare them.
Each box is a service we deployed and ran, as GitLab-CI-managed manifests with one build, release, deploy, rollback template.
When pricing or dispatch changes in one city there is no control group. We built a service that estimates the counterfactual from the cities that did not change.
On the pre-treatment window, a model learns how a target city's daily metric tracks the same metric in donor cities, then keeps predicting after the change. The gap is the estimated effect. Treated cities freeze their pre-treatment model and stream predicted, actual and signed error to a dashboard every morning.
Actual against counterfactual, indexed to 100. The shaded gap after the change is the effect. Illustrative series
Mean absolute percentage error over the post-period, from the delivered reports. Part of this gap is the treatment itself.
Shorter studies that fed product decisions: how surge converts, where pooling is possible, and what drives a driver's response to an incentive.
Per-hexagon LSTM models on 30-second supply and demand buckets. Adding marketplace state to the surge engine's features cut error by 63%.
1.2 million rides matched on origin and destination hexagons within the same window. Between 24% and 29% had at least one match candidate. Map illustrative
SHAP explanations over a 59-feature incentive-response model, so the incentive team could see which levers the model used. Illustrative plot
Approach
Per city, bucketed by ride ID: 1%, 10%, 50%, 100%. The same dials run the experiments.
Unit and integration tests boot the real server against in-memory dependencies. CI blocks on them.
Metrics from the first deploy. Model quality recomputed from live outcomes, not only the validation set.
Models baked into tagged images. Deploy, rollback and delete are each one step.
Leakage checks fail the build. Null results are reported as null results.
Thresholds, quantiles, buckets and versions live in config. A new city is a config change.
Stack
Timeline
Work with us
We take on embedded engagements: a small ML and platform team that ships into your stack, owns it in production and hands it over documented.
Client name withheld under confidentiality. Figures come from the delivered code, configuration and release history. Graphics marked illustrative show the shape of a result, not client data.