Learn / Build a Model

Build a Model

Submit a training job with model train / model build (backend "http", then poll model status. Dry-run writes fixture artifact paths (no GPU, no network). Live POSTs to your trainer at SPARK_TRAIN_URL via spark-train-http.

  1. 1. Choose path
  2. 2. Copy .spark snippet
  3. 3. Run locally

Step 1 — Path

Step 2 — Generated program

Copy into model_train.spark:

Step 3 — Run

Dry-run uses offline fixtures (no API key, no GPU). Configure SPARK_TRAIN_URL only for live HTTP training. Optional ask after train still uses AI_GATEWAY_URL when you want it.

Train ops (dry fixtures)

model train dataset "examples/fixtures/train/dataset.jsonl" base "fixture-base" out "out/train/job-dry-001" backend "http" -> job
model status "job-dry-001" -> status

Full docs: Model training · Language reference.

Preview in browser

Try related snippets in the Playground dry-run preview.