fix: F1/F2 skip gracefully instead of crashing the whole Option A figure suite - #118
Merged
Merged
Conversation
F1/F2 hard-depended on results/convergence_trace/sweep.json, whose generator was deliberately removed in a prior prune (that characterization paper now lives in jcm-sci/vbpca-convergence). The missing-data check raised SystemExit, which killed main()'s loop before F3/F5/F7 ever ran -- the whole documented `--fmt png` usage has been silently broken since that prune, and every figure checked into the repo is stale. _load_trace() now returns None (with a one-line notice) instead of raising when the file is absent; F1/F2 skip early on None, F3/F5/F7 (which have their own local data sources) are unaffected.
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.
Summary
option_a_figures.py's own documented usage (--fmt png, no args) has been silently broken since the Aug 17 prune commit that removedconvergence_trace.py(moved to jcm-sci/vbpca-convergence). F1/F2 hard-depend onresults/convergence_trace/sweep.json;_load_trace()raisedSystemExitwhen it's missing, which killedmain()'s figure loop before F3/F5/F7 ever ran. Every PNG checked intoanalysis/results/figures/optionA/predates the prune and hasn't regenerated since.Change
_load_trace()returnsNone(with a one-line console notice) instead of raising when the trace file is absent;fig_f1_knee/fig_f2_broadpriorskip early onNone.--only f3 f5 f7already worked around this; now the full default invocation does too.Verification
F7 (recommended-config
rank_maeover the(n, p)plane) is worth a look while reviewing -- it visually shows the RegimeSurrogate never trained on anything pastp<=n-ish, corroborating #116's finding independently.Test plan
just cipasses (this script isn't covered bymypy/pytest coverage gates, which only scopesrc/)results/convergence_trace/present🤖 Generated with Claude Code