Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
Use cases/ Machine Learning/ Batch-scoring a million rows with an ONNX model
The scoring pipeline — Parquet in, ONNX inference node mid-run, scored preview and metrics board replace with screenshot · 1600 × 900

Batch-scoring a million rows with an ONNX model

Drop a million-row Parquet batch on the canvas, reuse the exact normalize step the model trained with, and stream it through an ONNX inference node. LSD writes scored Parquet plus a metrics dashboard, and every intermediate stays cached for inspection.

Beginner ⏱ 20 min onnxbatch-inferenceparquetarrowscoring

The job#

A propensity model, trained wherever you like — sklearn, XGBoost, PyTorch — and exported to ONNX. Once a month a fresh extract of every customer lands as Parquet, and someone has to turn propensity.onnx plus a million rows into a scored table the warehouse can join by morning.

Why the boring part goes wrong#

Batch scoring fails at the seams, not in the model. The scoring script reimplements the preprocessing "close enough", a column arrives as int64 instead of float32, and the job exits 0 while producing garbage. Nobody notices until the campaign underperforms.

LSD closes both seams. The model's input signature is part of the pipeline, so a mismatch is a red node, not a silent cast. And preprocessing isn't reimplemented at all — the training pipeline's normalize step is dropped in and reused with its fitted parameters intact.

What you need#

Three things. The ONNX file, the batch (Parquet or Arrow — both land as the same typed entity), and the normalize step exported from training. Everything in the walkthrough happens on one canvas, and every intermediate — raw, normalized, scored — stays cached. So when someone asks why account 48,201 scored 0.97, you click through the nodes and answer from the data, not from memory.

Step by step

How it's built

  1. #011 · Load 01

    Drop the batch on the canvas

    Drag `customers_2026-06.parquet` onto the canvas — 1.04M rows appear as a typed entity with a live preview and per-column stats. An Arrow feed works identically if the batch comes straight from your warehouse exporter.

    Million-row Parquet entity with per-column stats replace with screenshot · 1200 × 750
  2. #012 · Shape 02

    Reuse the training normalization

    Import the @shape normalize step saved from the training pipeline instead of rewriting it. Its fitted means and scales come along as cached params, and the preview shows standardized columns immediately — zero train/serve skew by construction.

    Normalize step with its fitted-params panel open replace with screenshot · 1200 × 750
  3. 03

    Wire columns to the model signature

    Drop `propensity.onnx` on the canvas and LSD reads its input signature. Map entity columns to the model's expected tensor — any dtype or column-order mismatch flags the node red before a single row is scored.

    ONNX input mapping with one dtype mismatch flagged replace with screenshot · 1200 × 750
  4. #013 · Deliver 04

    Run inference in batches

    Hit run and the inference step streams the entity through ONNX Runtime in 64k-row batches. A progress bar tracks throughput, and scores append as a new `p_convert` column you can preview while the run is still going.

    Inference step mid-run with throughput readout replace with screenshot · 1200 × 750
  5. #014 · Deliver 05

    Write scored Parquet and the metrics board

    Point the @deliver export at `scored/` and toggle the report on. You get one scored Parquet file plus a dashboard — score distribution, null counts, rows per second, and drift against the training feature stats.

    Scored output preview beside the metrics dashboard replace with screenshot · 1200 × 750
The pipeline

Every step used, at a glance

Load

Scoring batch

Ingest the million-row batch from Parquet or an Arrow feed as one typed entity.

ParquetArrow
Shape

Training-identical prep

Apply the exact normalize step the model was trained with, fitted params included.

Deliver

Score & report

Stream rows through ONNX Runtime and write scored Parquet plus a metrics dashboard.

ONNXParquet
1.04M rows
scored in a single canvas run
3 min 40 s
end-to-end on a laptop, previews included
Zero skew
normalization reused from training, not reimplemented

More use cases