// Per-model evaluation report. // // Data is injected as a JSON string via `sys.inputs.data` by // tasks/analysis.py (model_report). The bundled Typst compiler has no // `json.decode`, so we parse with `json(bytes(...))`. #let data = json(bytes(sys.inputs.at("data"))) #set document(title: data.title) #set page( paper: "a4", margin: (x: 2cm, top: 2cm, bottom: 1.6cm), numbering: "1 / 1", ) #set text(size: 10pt) #set par(justify: true) #let fmt-pct(x) = [#calc.round(x * 100, digits: 1)%] #let fmt-num(x) = [#calc.round(x, digits: 3)] // ---- Header ---- #align(center)[ #text(18pt, weight: "bold")[#data.title] \ #v(-3pt) #text(9pt, fill: luma(110))[ Generated #data.generated · schema v#data.schema_version · seed #data.seed · commit #raw(data.git_commit) ] ] #v(2pt) #text(9pt)[*Working directory:* #raw(data.work_dir)] #line(length: 100%, stroke: 0.5pt + luma(200)) #v(4pt) // ---- One section per model family ---- #let family-block(fam) = { heading(level: 2, fam.name) text(9pt, fill: luma(90))[ Source: #raw(fam.source + ".nc") · split #raw(fam.split) · noise σ = #fmt-num(fam.noise_sigma) · #fam.n_models model(s) · #fam.n_samples samples · #fam.n_mc MC pass(es) ] v(4pt) block(fill: luma(245), inset: 8pt, radius: 4pt, width: 100%)[ *Ensemble accuracy:* #fmt-pct(fam.accuracy_mean) ± #fmt-pct(fam.accuracy_std) #h(1fr) *Best member:* #fmt-pct(fam.accuracy_best) ] v(6pt) table( columns: (auto, 1fr, 1fr, 1fr), align: (col, row) => if col == 0 { left } else { right }, stroke: none, inset: (x: 8pt, y: 5pt), fill: (col, row) => if row == 0 { luma(228) } else if calc.odd(row) { luma(248) }, table.header( [*Model*], [*Accuracy*], [*Mean pred. entropy*], [*Mean mutual info.*], ), ..fam.models .map(m => ([#m.index], fmt-pct(m.accuracy), fmt-num(m.mean_entropy), fmt-num(m.mean_mi))) .flatten() ) v(10pt) } #for fam in data.families { family-block(fam) } #v(1fr) #align(center)[#text(8pt, fill: luma(150))[ALNN evaluation harness — model report]]