LearnSystem design

Data engine and offline evaluation for end-to-end driving

Design the pipeline that turns fleet driving logs into training data for an end-to-end driving model and decides whether a new model is ready for road testing.

ML engineering8 parts

Contents

Constraints

  • hundreds of petabytes of multimodal logs
  • thousands of hours of new driving per week
  • safety-driver interventions as rare, high-value events

What to cover

Sketch your own design first. A complete answer has these parts; the notes say what each should settle.

  1. RequirementsDesign the pipeline that turns fleet driving logs into training data for an end-to-end driving model and decides whether a new model is ready for road testing.
  2. Estimateshundreds of petabytes of multimodal logs; thousands of hours of new driving per week; safety-driver interventions as rare, high-value events.
  3. API
  4. Data model
  5. ArchitectureIngestion and schema normalisation; automatic scenario tagging and embedding-based search.; Intervention mining; curation with a model-in-the-loop (better models select better data).; Large-scale distributed training.; Evaluation ladder: open-loop metrics → closed-loop simulation and generative world-model scenarios for what-if testing → track tests → supervised road tests.; Regression suite of hard scenarios; release gating.
  6. Deep dives
  7. Trade-offsdata quantity vs curation quality; simulation fidelity vs scale; open-loop speed vs closed-loop validity; generalisation across vehicle platforms.
  8. EvaluationScenario-weighted pass rates; intervention rate per 1,000 km in supervised trials.; Closed-loop collision and comfort metrics; correlation of sim scores with on-road outcomes (rank agreement).

Reference design

One way to answer it, part by part. Open a part once you have your own version of it.

Requirements

Two systems

  • Data engine: ingest fleet logs (multi-camera video, other sensors, vehicle signals, driver interventions), normalise them across vehicle platforms, tag and index scenarios, mine valuable data (interventions, rare events, model disagreements), and build versioned training sets for an end-to-end driving model.
  • Evaluation and release gating: decide, with evidence, whether a new model is safe and good enough to go to supervised road testing.

Constraints and assumptions to confirm

  • Hundreds of petabytes in storage; thousands of hours of new driving per week across cities and vehicle platforms (different cameras and calibrations).
  • Safety-driver interventions are rare and are the highest-value signal; each needs a reason (safety, comfort, route, system fault).
  • Privacy: faces and number plates blurred before data is used beyond safety investigation; UK GDPR retention rules; data-sharing agreements with fleet partners.
  • Reproducibility: any model must be traceable to the exact data, code and configuration it was trained on.
  • Release decisions involve a safety team and a documented safety case; the pipeline produces evidence, it does not decide alone.
  • Users: research engineers (dataset building), safety engineers (evaluation), operations (road testing).

Estimates

  • New data: assume 3,000 driving hours/week. ~8 cameras at ~10 Mbps compressed ≈ 36 GB/h, plus other sensors ≈ ~40 GB/h → 120 TB/week ≈ 6 PB/year raw. Decoded frames at several resolutions, embeddings, reconstructions and simulation outputs multiply that 5–10×, so hundreds of PB with history is plausible.
  • Distance: at ~25 km/h urban average, 3,000 h ≈ 75,000 km/week. At one intervention per ~50 km in a newly launched city, ~1,500 interventions/week — rare relative to the data, but plenty to mine.
  • Clips: 3,000 h = 10.8M seconds ≈ 1.1M ten-second clips/week; curation might up-weight the most informative ~10–20%.
  • Tagging and embedding: sampling 2 fps × 8 cameras ≈ 173M images/week; a vision encoder at ~2k images/s per GPU ≈ 86k GPU-seconds ≈ 24 GPU-hours/week — cheap next to training.
  • Training I/O: 1,000 GPUs × 5 samples/s × (8 cameras × 6 frames × ~100 KB) ≈ 24 GB/s sustained reads → pre-sharded, compressed sample files on a high-throughput store with local NVMe caching.
  • Closed-loop evaluation: 10k scenarios × 30 s × 3 seeds = 900k simulated seconds per candidate; at ~1× real time per GPU for a neural simulator ≈ 250 GPU-hours per model — affordable per release candidate, too much per training checkpoint, hence an evaluation ladder.

API

Internal services rather than a public API:

Search:   POST /v1/scenes/search {text: "cyclist overtaking at night in rain",
                                  filters: {city, platform, date_range, tags, intervention: true},
                                  embedding_query?: clip_id}   → [{clip_id, score, thumbnails}]
Datasets: POST /v1/datasets {name, query | clip_ids, sampling_weights, split_rules, exclusions}
                             → {dataset_id, version, manifest_uri, stats}
Mining:   POST /v1/mining/jobs {type: "intervention"|"disagreement"|"rare_event", model_id, window}
Eval:     POST /v1/eval/runs {model_id, suite: "release-v14", levels: ["open_loop", "closed_loop"]}
                             → {run_id}; GET /v1/eval/runs/{id} → metrics per scenario, regressions
Release:  POST /v1/releases/{model_id}/evidence  → assembled report for the safety review

Every dataset version and evaluation suite is immutable, so results are reproducible and comparable.

Data model

  • DriveLog: vehicle, platform (sensor rig and calibration version), software version, route, city, date, weather, total distance, storage URIs, privacy status (blurred / restricted).
  • Clip: log, time window, sensor streams, auto-tags (weather, road type, junction type, agents present, manoeuvre), embedding, quality flags (sensor dropouts, calibration drift).
  • Event: intervention or disengagement (timestamp, reason, driver note), hard braking, near miss, model–driver disagreement.
  • ScenarioTaxonomy: hierarchical categories (unprotected turn, roundabout, pedestrian crossing, cyclist overtake …) with criticality weights.
  • DatasetVersion: clip ids, sampling weights, splits, exclusion rules, lineage, statistics by category.
  • Model: checkpoint, dataset version, code commit, config, training metrics.
  • EvalSuite / EvalRun: suite version (scenario list, sim versions, metrics definitions), run results per scenario and seed.
  • ReleaseRecord: model, evidence, decision, approvers, conditions (cities, speeds, weather).

Architecture

Flow · 5 stepsFleet logs to release-gated driving model

Fleet logs to release-gated driving modelThe diagram shows a data engine on the left feeding distributed training in the middle and evaluation and release gating on the right. Fleet logs are normalised into a lake, tagged and indexed, mined and curated into versioned datasets, trained, then checked from open-loop metrics through closed-loop simulation, track and supervised road tests before a safety review decides go or no-go.Fleet logsvideo, sensors, signals,interventionsIngestion and normalisationdecode, time-sync, calibration,blurringLakeraw + derived, tiered storageAuto-tagging and embeddingsweather, road type, agents,manoeuvreScenario indextext and embedding searchMining and curationinterventions, rare events,disagreementsDataset builderversioned manifests, samplingweightsDistributed trainingdata-parallel, checkpoints, lineageEvaluation ladderopen-loop, closed-loop, track, roadRelease gatingevidence, safety review, go / no-goembeddingssearchcurated clipssharded samplescandidateevidenceroad data12345Data engineTrainingEvaluation
  1. Ingest and normalise Fleet logs are decoded, time-synced and schema-normalised across platforms, then written to the lake.
  2. Tag and index Clips are auto-tagged and embedded into a scenario index for text and embedding search.
  3. Mine and curate Interventions, rare events and model disagreements are mined and up-weighted; the current model scores where it is weak.
  4. Train Versioned datasets are sharded and used for distributed training with checkpoints and lineage.
  5. Evaluate and gate A candidate moves through open-loop, closed-loop, track and road tests; evidence goes to safety review, and road-test data returns to the fleet.

Fleet logs flow through ingestion, tagging, mining and curation into versioned training data, then through an evaluation ladder to a safety-reviewed release gate.Diagram drafted by a local AI model (Inkling 2 Mini) from this page's text and drawn from data. Checked by an independent reviewer.
Data
Steps
StepTitleWhat happens
1Ingest and normaliseFleet logs are decoded, time-synced and schema-normalised across platforms, then written to the lake.
2Tag and indexClips are auto-tagged and embedded into a scenario index for text and embedding search.
3Mine and curateInterventions, rare events and model disagreements are mined and up-weighted; the current model scores where it is weak.
4TrainVersioned datasets are sharded and used for distributed training with checkpoints and lineage.
5Evaluate and gateA candidate moves through open-loop, closed-loop, track and road tests; evidence goes to safety review, and road-test data returns to the fleet.

Source: This page's text

Boxes
BoxGroupDetail
Fleet logsData enginevideo, sensors, signals, interventions
Ingestion and normalisationData enginedecode, time-sync, calibration, blurring
LakeData engineraw + derived, tiered storage
Auto-tagging and embeddingsData engineweather, road type, agents, manoeuvre
Scenario indexData enginetext and embedding search
Mining and curationData engineinterventions, rare events, disagreements
Dataset builderData engineversioned manifests, sampling weights
Distributed trainingTrainingdata-parallel, checkpoints, lineage
Evaluation ladderEvaluationopen-loop, closed-loop, track, road
Release gatingEvaluationevidence, safety review, go / no-go

Source: This page's text

Sequence · 5 stepsEvaluation ladder for a release candidate

Evaluation ladder for a release candidateFive actors left to right: candidate model, open-loop eval, closed-loop sim, track/road tests and safety team. The checkpoint flows right through the ladder; each stage passes or stops the candidate, and the safety team records a go or no-go decision with conditions.Candidate modelOpen-loop evalClosed-loop simTrack/road testsSafety team1checkpoint2pass filter3pass closed-loop4evidence report5go / no-go
Evaluation ladder for a release candidateFive actors left to right: candidate model, open-loop eval, closed-loop sim, track/road tests and safety team. The checkpoint flows right through the ladder; each stage passes or stops the candidate, and the safety team records a go or no-go decision with conditions.Candidate modelOpen-loop evalClosed-loop simTrack/road testsSafety team1checkpoint2pass filter3pass closed-loop4evidence report5go / no-go
  1. Open-loop check Cheap trajectory-error metrics run on every checkpoint.
  2. Closed-loop simulation Reconstructed scenes, generative what-if variants and the hard-scenario regression suite.
  3. Track and road tests Track tests on a closed course, then supervised road tests with safety drivers.
  4. Evidence report Scenario-weighted pass rates, intervention rates per 1,000 km and simulator rank agreement are assembled.
  5. Release gate Safety review decides go or no-go with conditions; the pipeline produces evidence, not the decision.

A candidate model moves through cheap open-loop checks, closed-loop simulation, track and supervised road tests, and a safety review before release.Diagram drafted by a local AI model (Inkling 2 Mini) from this page's text and drawn from data. Checked by an independent reviewer.
Data
Messages
StepFromToMessage
1Candidate modelOpen-loop evalcheckpoint
2Open-loop evalClosed-loop simpass filter
3Closed-loop simTrack/road testspass closed-loop
4Track/road testsSafety teamevidence report
5Safety teamSafety teamgo / no-go

Source: This page's text

Fleet ─► upload (depot, bulk) ─► Ingestion: decode, time-sync, schema normalisation
   across platforms, calibration attach, privacy blurring, quality checks
   ─► Lake (raw + derived, tiered storage)
   ─► Auto-tagging + embeddings ─► Scenario index (text and embedding search)
   ─► Mining: interventions, rare events, model–driver disagreement, uncertainty
   ─► Curation with model in the loop (current model scores where it is weak)
   ─► Dataset builder (versioned manifests, sampling weights) ─► sharded samples
   ─► Distributed training (data-parallel + sharding, checkpoints, lineage)
Evaluation ladder per candidate:
   open-loop metrics (cheap, every checkpoint)
   ─► closed-loop simulation: reconstructed real scenes + generative world-model
      what-if variants + hard-scenario regression suite
   ─► track tests (closed course, scripted hazards)
   ─► supervised road tests (safety drivers, limited ODD) ─► fleet data again
Release gating: evidence report ─► safety review ─► go / no-go with conditions

Deep dives

Flow · 4 stepsMining interventions into training data

Mining interventions into training dataA flow from fleet logs through the lake to mining, triage, and the dataset builder. Mining pulls interventions with about 20 seconds of context; triage splits each into a training example and an evaluation scenario. The current model scores the whole new corpus and up-weights clips where it disagrees with the human driver or is uncertain. The dataset builder versions the manifest and keeps a stratified random sample.Fleet logsinterventions, sensors, signalsLakeraw + derived, tiered storageMininginterventions, rareevents, disagreementModel scoringdisagreement anduncertainty up-weightedTriagesafety, comfort, route, system faultTraining examplewhat the human didEvaluation scenarioclosed-loop replay andgenerated variantsDataset builderversioned manifests, stratifiedrandom sample~20 s contextnew corpusweights1234IngestMineCurateBuild
  1. Mine Fleet logs land in the lake; every intervention is pulled with ~20 s of context, alongside rare events and model disagreements.
  2. Triage Each intervention is triaged by reason and turned into a training example and an evaluation scenario.
  3. Score The current model scores the whole new corpus; clips where it disagrees with the human driver or is uncertain are up-weighted.
  4. Build The dataset builder versions the manifest and keeps a stratified random sample to avoid over-fitting to the mined distribution.

Interventions are pulled with context, triaged by reason, and turned into training examples and evaluation scenarios, while the current model up-weights disagreement and uncertainty.Diagram drafted by a local AI model (Inkling 2 Mini) from this page's text and drawn from data. Checked by an independent reviewer.
Data
Steps
StepTitleWhat happens
1MineFleet logs land in the lake; every intervention is pulled with ~20 s of context, alongside rare events and model disagreements.
2TriageEach intervention is triaged by reason and turned into a training example and an evaluation scenario.
3ScoreThe current model scores the whole new corpus; clips where it disagrees with the human driver or is uncertain are up-weighted.
4BuildThe dataset builder versions the manifest and keeps a stratified random sample to avoid over-fitting to the mined distribution.

Source: This page's text

Boxes
BoxGroupDetail
Fleet logsIngestinterventions, sensors, signals
LakeIngestraw + derived, tiered storage
MiningMineinterventions, rare events, disagreement
TriageMinesafety, comfort, route, system fault
Training exampleCuratewhat the human did
Evaluation scenarioCurateclosed-loop replay and generated variants
Model scoringCuratedisagreement and uncertainty up-weighted
Dataset builderBuildversioned manifests, stratified random sample

Source: This page's text

Intervention mining and model-in-the-loop curation. Every intervention is pulled with ~20 s of context, triaged by reason, and turned into a training example (what the human did) and an evaluation scenario (closed-loop replay and generated variants). The current model also scores the whole new corpus: clips where it disagrees with the human driver or is uncertain are up-weighted, so better models select better data. Guard against over-fitting to the mined distribution by keeping a stratified random sample in every dataset.

Why open-loop is not enough. Open-loop metrics (trajectory error against the logged human path) are cheap but poorly correlated with driving quality: small errors compound in closed loop, and the logged world does not react to the model. Closed-loop simulation lets the model drive and other agents respond, catching compounding errors. Generative world models add what-if variations (a pedestrian stepping out, different weather) around real scenes.

Trusting the simulator. Measure rank agreement (e.g. Kendall’s tau) between simulated scores and on-road intervention rates across past model versions; re-weight scenarios and fix simulator gaps where they disagree.

Trade-offs

  • Data quantity vs curation quality: more hours improve coverage, but most driving is uneventful; curated, re-weighted data improves rare-scenario behaviour faster per GPU-hour. Keep a random baseline slice to avoid blind spots introduced by curation.
  • Simulation fidelity vs scale: photoreal neural reconstructions and world models are expensive per scenario; cheaper simulators run more scenarios but with a sim-to-real gap. Use cheap levels to filter and expensive ones to decide.
  • Open-loop speed vs closed-loop validity: open-loop runs on every checkpoint in minutes; closed-loop on release candidates only. Track how well open-loop predicts closed-loop so the ladder filters correctly.
  • Generalisation across vehicle platforms: mixing platforms grows the data but differing sensors and calibrations can confuse the model; normalise inputs, condition on platform, and evaluate per platform before deploying to a new one.

Evaluation

  • Scenario-weighted pass rates: per category pass rates in closed loop, weighted by criticality and real-world frequency; a release must not regress any safety-critical category (e.g. zero new collisions in the hard-scenario suite), and the weighted score must beat the incumbent beyond its confidence interval across seeds.
  • Closed-loop metrics: collisions, near misses (time-to-collision thresholds), traffic-rule violations, progress and route completion, comfort (jerk, harsh braking).
  • Road outcomes: interventions per 1,000 km in supervised trials, split by reason, city, weather and road type, with confidence intervals (interventions are rare, so long trials are needed for tight bounds).
  • Simulator validity: rank agreement between sim scores and on-road outcomes across model versions, reviewed each release.
  • Data-engine health: ingestion lag, tagging accuracy on audited samples, share of interventions mined and triaged within a week, dataset reproducibility checks.

What a strong design shows

  • Treats interventions as the most valuable signal and builds mining, triage and scenario creation around them.
  • Uses the model in the loop to select data and versions every dataset for reproducibility.
  • Builds an evaluation ladder from open-loop to closed-loop simulation, track and supervised road tests, explaining why open-loop alone misleads.
  • Validates the simulator against road outcomes with rank agreement.
  • Gates releases on scenario-level non-regression and produces evidence for a human safety review.

Study material compiled with AI: drafted by a local model (Inkling 2 Mini) from public sources, then checked against those sources by independent AI reviewers (Claude) in November 2026. Not reviewed line by line by a person.