Repository navigation
chapter 3: drop internal evidence-scan checks; run smoke on small datasets - #131
Merged
Merged
Conversation
…asets The fit-problems and adaptive-reconstruction tutorials raised ValueError when an evidence scan was non-finite or peaked at the edge of its coefficient range. Those are developer checks, not lesson content, and they were the only reason the two tutorials declared `ENV: full_datasets`. At the small-dataset size the scans peak at the range edge, so the checks failed there. - Remove the `raise ValueError` guards (bracket and non-finite). - The fit-problems refinement step now clamps its neighbours, so a peak at the grid edge refines inward instead of indexing past the grid. At full size the peak is interior and behaviour is unchanged. - Remove the `__Env__` / `ENV: full_datasets` sections, so the smoke gate runs these tutorials on small datasets like the rest of the chapter. Users still run them at full size, since PYAUTO_SMALL_DATASETS is unset for them. Measured locally (py3.12, smoke env), both tutorials end to end: HowToLens: tutorial_5 98.0s -> 12.2s, tutorial_6 76.8s -> 18.6s HowToGalaxy: tutorial_3 81.9s -> 7.2s, tutorial_4 68.0s -> 11.4s Both also run end to end at full size. Notebooks regenerate at the next pre-build (scripts are the source). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016nhQ8McPUvDThp9s9JAiZz
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.
Why
chapter_3_pixelizations/tutorial_5_fit_problems.pyandtutorial_6_adaptive_reconstruction.pyare the two slowest HowToLens smoke scripts (60.3s and 67.7s on CI, about half the leg). They declaredENV: full_datasetsonly because their internalraise ValueErrorchecks (evidence scan non-finite, or peak at the edge of the coefficient range) fail at the small-dataset size. Those checks aren't lesson content, so the maintainer chose to remove them rather than pay for full-size data in every PR.Change
raise ValueErrorguards (bracket and non-finite).max(best_index - 1, 0)/min(best_index + 1, len - 1)), so a peak at the grid edge refines inward instead of raisingIndexError. At full size the peak is interior, so behaviour is unchanged.__Env__/ENV: full_datasetssections, so the smoke gate runs these on small datasets like the rest of the chapter. Users still run them at full size.Verification (local, py3.12, smoke env)
The resolved smoke env now gives
PYAUTO_SMALL_DATASETS=1for both. The same change is in HowToGalaxy (tutorials 3 and 4).Note: this PR's smoke CI uses the same-named library branches, and PyAutoArray
ccr-eef5e2b2-t0z1tpexists (PyAutoArray#679, curvature compile reuse), so CI here also exercises that branch.Generated by Claude Code