docs(demo): document precompute input contract + guard missing XES logs#145
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
demo/precompute_demo.pyregenerates the bundled demo assets from two gitignored sources, not justoutputs/:outputs/zero_shot/+outputs/er/— predictions/targets/metadata and the precomputed ER sweep;data/processed_logs/<dataset>.xes— the processed XES event logs, reloaded by the truth-DFG ER baseline (feat(demo): truth-DFG ER baseline beside the forecast ER (Story 8) #89) to recompute the per-windowtruth_er.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_eris baked into the committedmetrics.json.Changes (all in
demo/precompute_demo.py)main()that raises a clearFileNotFoundErrorlisting any missing XES logs before any assets are written, instead of an opaque loader failure part-way through the 12-pair sweep.Verification
outputs/+ logs → byte-identical to the committed assets (no behavioral change).LOG_DIRat a dir without the logs raises the newFileNotFoundErrornaming the missing files.ruff check+ruff format --checkpass.Closes #91.