Skip to content

chapter 3: drop internal evidence-scan checks; run smoke on small datasets - #105

Merged
Jammy2211 merged 1 commit into
mainfrom
ccr-eef5e2b2-t0z1tp
Nov 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
ccr-eef5e2b2-t0z1tp

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Why

chapter_3_pixelizations/tutorial_3_fit_problems.py and tutorial_4_adaptive_reconstruction.py are the two slowest HowToGalaxy smoke scripts (56.5s and 61.9s on CI, about 55% of the leg). They declared ENV: full_datasets only because their internal raise ValueError checks (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.

Change

  • Remove the raise ValueError guards (bracket and non-finite).
  • tutorial_3's refinement step now clamps its neighbours, so a peak at the grid edge refines inward instead of indexing past the grid. At full size behaviour is unchanged.
  • Remove the __Env__ / ENV: full_datasets sections, so smoke runs these on small datasets. Users still run them at full size.
  • Scripts only; notebooks regenerate at the next pre-build.

Verification (local, py3.12, smoke env)

Script small (CI now) full size (users)
tutorial_3_fit_problems 7.2s ✅ 81.9s ✅
tutorial_4_adaptive_reconstruction 11.4s ✅ 68.0s ✅

Companion: the same change for HowToLens tutorials 5 and 6. The smoke CI here uses same-named library branches, which includes PyAutoArray ccr-eef5e2b2-t0z1tp (PyAutoArray#679).


Generated by Claude Code

…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
@Jammy2211
Jammy2211 merged commit 9230843 into main Nov 8, 2026
8 checks passed
@Jammy2211
Jammy2211 deleted the ccr-eef5e2b2-t0z1tp branch November 8, 2026 16:41
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.

2 participants