The brain page
The brain page at /brain/<id> is where you land after sending a brain to practise. It’s a state machine with three faces:
- 🎒 Practising — training is in flight
- 🎓 Ready — training finished successfully; the brain is usable
- 😅 Stumbled — training failed, was cancelled, or was skipped
The page subscribes to a server-sent-events stream so progress updates in real time without polling.
Practising state
What you see while a run is queued, running, or draft:
- Hero — ”🎒 Your brain is practising”
- Progress card:
- Progress bar — fills as
latestStep / totalSteps. Indeterminate scan animation while warming up. - “Step 3,200 of 10,000” counter
- “Latest loss: 0.241 — lower is better. The brain learns by lowering this number.”
- Live log — last 8 lines from the trainer, color-coded: green (good), red (bad), grey (note)
- Progress bar — fills as
- ⏹ Cancel practise button — at the bottom of the progress card, subtle red
Cancelling
The cancel button is destructive — clicking it opens a confirmation modal:
Cancel practise? The brain will stop training where it is. Any wallclock time spent so far won’t be recovered, and the run will be marked cancelled. You can always start a new practise run from the same prior + brain — none of your wizard choices are lost.
[Keep practising] · [⏹ Yes, cancel]
Confirm and the run status flips to cancelled and the page transitions to the Stumbled state. If you were training on Vast.ai (Marathon mode), the instance is not terminated automatically — head to the Vast.ai dashboard and destroy it if you don’t want to keep paying.
Ready state
What you see when the run completes successfully:
- Hero — ”🎓 Your brain can
<primary capability>” (e.g. “Your brain can predict a number”). If multiple capabilities, the lede mentions secondaries: “It also learned to show confidence.” - What this brain can do card — capability chips with hover descriptions. Derived from the prior slug (see Capabilities reference for recovery details).
- How well it learnt card — one line per goal, green ✓ + the goal’s title. Below the goals, a “Training summary: final loss 0.241, practised for 5m 12s.”
- Try it on your data card — the inline predict form (see below)
- Open the advanced view footer link — drops to
/projects/<id>for the full developer surface
Try it on your data
The form is shape-aware. For a regression brain it shows:
- Examples (with answers) — drop or paste a CSV, one row per example. Last column is
y. - Questions (predict for these) — drop or paste a CSV, one row per query. Same columns as examples minus the answer.
For classification: same shape, last column is the label (0 or 1).
Each field has:
- A drop zone (file picker + drag-and-drop)
- A
countchip that turns amber/red if the row dimensions don’t match what the model expects - An ”✨ or use a sample to see how it works” button that fills with synthetic data of the right shape
- An expand-to-modal icon for editing larger grids row-by-row
Click Predict and the predictions render in a table beneath:
| Question | Prediction |
|---|---|
[1.2, 3.4] | 5.1 |
[2.1, 0.8] | 4.3 |
For classification, the columns are x and label (with probability). For unsupported shapes (causal discovery, more than inlineMaxCols features), the inline form is replaced by a link to the advanced Try-it at /projects/:id/runs/:runId.
Stumbled state
What you see when the run is failed, skipped, or cancelled:
- Hero — ”😅 Practise hit a snag”
- Failure summary — one sentence in plain English:
cancelled→ “Practise was cancelled before it finished.”skipped→ “The brain didn’t run because:<reason>. Usually a missing dependency on the runner.”failed→ “Something went wrong during practise. The technical details below will say what.”
- Failure detail code block — the error message or skip reason
- CTAs:
- ↻ Try again (primary) — re-executes the same run; same prior + model + evals + hyperparams
- See the technical details — link to the advanced run-detail page
Auto-fill recovery after navigation
The wizard state (selected capabilities) lives in-memory only — it’s empty when you reload /brain/<id> an hour later. To still show capability chips, the brain page looks up the prior’s slug in the catalog (capabilitiesForPriorSlug(slug)) and recovers the wrapper’s capabilities tags. Single-prior brains work cleanly; mixture brains (starter-mix-* slug) show no chips for now.
Routing
| State | Status field on the run | Hero hue |
|---|---|---|
| practising | queued, running, draft | amber (#fbbf24) |
| ready | completed | green (#34d399) |
| stumbled | failed, skipped, cancelled | red-ish (#f87171) |
The hue cascades into the ambient backdrop + progress bar + CTA buttons so the page’s mood matches the state.