Compare runs
compare_runsCompare two topology optimization runs or a base run with its variants, showing setup differences, metric deltas, and input inconsistencies side by side.
Instructions
Runs side by side: two runs (setup diff and metrics diff), or a base with its variants (one table). Reads files, writes nothing.
Give one form. (run_a, run_b): A is the base and B the change; delta is B - A. Every value names its source: run.json (what each
run recorded at its start: the YAML path and the region file names, no hash), labels.bin, the YAML and STL files on disk (read now),
and result/metrics.json. So the files on disk can be newer than the run or can differ from it; inputs says so as facts (a newer
YAML or STL, YAML values that differ from run.json, labels from the files on disk that differ from labels.bin). The facts are evidence, not proof.
(run_a, variants): run_a is the base; variants is a list of run folders, any number. One row per run, the base first.
run_a: the base run folder (relative paths start at the work folder). run_b: the changed run folder (two-run form). variants: the run folders of the table (table form); not together with run_b. check_labels: voxelize the YAML on disk and compare it with labels.bin (a few seconds on a big grid). null: do it when the grid has at most 10 million voxels. true: any grid size. false: skip it. Two-run keys: a, b, setup (run_json_diff, yaml_diff, region_files with the STL hashes, labels_diff: the voxel classes that changed, with the box in mm), metrics (rows with a, b, delta, delta_pct; stiffness per case; filter facts), inputs, notes (for example: the load cases differ, so compliance is not comparable), summary and problems. Table keys: base; runs (state, mass_final_g, mass_saved_pct, stiffness per load case from the optimizer, verdict, verify: done, not run or no result, print: a few print facts, render: the path of the newest montage PNG on disk, or null); vs_base (the setup diff of each variant against the base); notes; summary; problems. A fact that no file holds is null and an entry in problems. The table makes no image: render_part does. On a wrong call or folder: {"ok": false, "error": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| run_a | Yes | ||
| run_b | No | ||
| variants | No | ||
| check_labels | No |