Skip to content

docs(demo): document precompute input contract + guard missing XES logs#145

Merged
YongboYu merged 1 commit into
mainfrom
docs/precompute-input-contract
Jun 9, 2026
Merged

docs(demo): document precompute input contract + guard missing XES logs#145
YongboYu merged 1 commit into
mainfrom
docs/precompute-input-contract

Conversation

@YongboYu

@YongboYu YongboYu commented Jun 9, 2026

Copy link
Copy Markdown
Owner

What

demo/precompute_demo.py regenerates the bundled demo assets from two gitignored sources, not just outputs/:

The module docstring still claimed it regenerated "from existing zero-shot outputs", which became stale once the truth-ER baseline landed. This is purely about the regeneration/reproducibility step — serve-time is unaffected, since truth_er is baked into the committed metrics.json.

Changes (all in demo/precompute_demo.py)

  • Document the two-source input contract in the module header.
  • Add a pre-flight check in main() that raises a clear FileNotFoundError listing any missing XES logs before any assets are written, instead of an opaque loader failure part-way through the 12-pair sweep.

Verification

  • Regenerated all 12 pairs against the local outputs/ + logs → byte-identical to the committed assets (no behavioral change).
  • Error path: pointing LOG_DIR at a dir without the logs raises the new FileNotFoundError naming the missing files.
  • ruff check + ruff format --check pass.

Closes #91.

precompute_demo.py regenerates the bundled assets from outputs/ AND the
processed XES event logs (data/processed_logs/*.xes) — the truth-DFG ER
baseline (#89) reloads the logs to recompute per-window truth_er, so
outputs/ alone is no longer sufficient. The module docstring still claimed
"from existing zero-shot outputs", which was stale.

- Document the two-source input contract in the module header.
- Add a pre-flight check in main() that fails with a clear FileNotFoundError
  listing any missing XES logs, before any assets are written, instead of an
  opaque loader failure part-way through the 12-pair sweep.

Serve-time is unaffected — truth_er is baked into the committed metrics.json.

Closes #91
@YongboYu YongboYu merged commit 0e3c246 into main Jun 9, 2026
5 checks passed
@YongboYu YongboYu deleted the docs/precompute-input-contract branch June 9, 2026 11:25
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.

demo/precompute: truth_er regeneration depends on processed XES logs, not just outputs/

1 participant