Skip to content

feat(cli): output_schema for sim + batch render archive; review nits (v1.5)#438

Merged
vsbuffalo merged 1 commit into
mainfrom
feature/output-schema-render-v1.5
Jul 15, 2026
Merged

feat(cli): output_schema for sim + batch render archive; review nits (v1.5)#438
vsbuffalo merged 1 commit into
mainfrom
feature/output-schema-render-v1.5

Conversation

@vsbuffalo

Copy link
Copy Markdown
Owner

output_schema for sim + batch render archive + review nits (v1.5)

Follow-up to #436 (fit output_schema) and #437 (render). Extends both to
simulation runs and folds in the adversarial review's low-severity findings.

sim

  • Each sim leaf's run.json declares its traj.tsv column schema (t→time,
    compartments→state, flow_*→flow), classified from the in-memory artifacts
    before the atomic commit — a new RecordMeta.output_schema attached at build
    time (the sim path knows its files up front, unlike the streaming fit path
    which sets it at finalize).
  • Batch runs archive model.render.json beside model.ir.json at the ensemble
    output_dir.

classify unified

One classifier for fit and sim: reserved axis/key/prefix names + a
table-specific default (Diagnostic for fit traces, State for trajectories).

review nits

  • F1 — document classify's naming assumption (reserved vocab vs model param
    names; safe because camdl params are epidemiological).
  • F2 — read the first readable chain's trace header, not the
    lexicographically-first dir (a crashed/absent early chain no longer drops it).
  • F4TableRole::Trace doc covers optimizer traces (if2/nlopt).

Verified: single simulate leaf carries the trajectory schema; a batch run
writes model.render.json paired with model.ir.json.

Deferred: predict/survey/profile output_schema; single-simulate render
(mirrors the existing no-model.ir.json-for-single-sim behavior); an
integration test for the archives.

Extend run.json output_schema to simulation runs and fold in the
output_schema review's low-severity findings.

- sim: each sim leaf's run.json declares its traj.tsv column schema
  (t → time, compartments → state, flow_* → flow), classified from the
  in-memory artifacts before the atomic commit via a new
  RecordMeta.output_schema attached at build time. Batch runs also archive
  model.render.json beside model.ir.json at the ensemble output_dir.
- classify is unified: reserved axis/key/prefix names plus a table-specific
  default (Diagnostic for fit traces, State for trajectories), so one
  classifier serves fit and sim.
- F1: document the naming assumption (reserved vocabulary vs model parameter
  names — safe because camdl params are epidemiological, never column names).
- F2: read the first READABLE chain's trace header, not merely the
  lexicographically-first directory, so a crashed/absent early chain no
  longer drops the trace entry.
- F4: TableRole::Trace doc covers optimizer traces (if2/nlopt), not only
  samplers.

Verified: a single simulate leaf carries the trajectory schema; a batch run
writes model.render.json paired with model.ir.json.

Proposal: docs/dev/proposals/2026-07-15-run-output-column-schema.md
@vsbuffalo
vsbuffalo merged commit 0b1fbe1 into main Jul 15, 2026
2 checks passed
@vsbuffalo
vsbuffalo deleted the feature/output-schema-render-v1.5 branch July 15, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant