docs: make the multi-start batch_size decision explicit - #205
Merged
Conversation
A new static check in PyAutoHands flags any MultiStart* search built without an explicit batch_size, because defaulting to None is how both interferometer/start_here.py files inherited an unbounded 48-way vmap on the same day and OOMed two nightly release runs. These four sites keep their current behaviour exactly - None is already the default, so nothing changes at runtime. What changes is that the choice is now written down where a reviewer sees it, with a pointer to the knob if a reader hits a memory limit. Deliberately not given a bounded value: these are CCD imaging, cluster, multi-galaxy and guide likelihoods rather than interferometer ones, and picking a real number needs a measurement on hardware this could not make. imaging/start_here.py is the one most worth profiling later, since a user on a laptop GPU meets it first. Refs PyAutoLabs/PyAutoFit#1452. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0171voyyTrr91hJ3vU5AjeVz
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.
Follow-up to #204, for PyAutoLabs/PyAutoFit#1452.
What and why
PyAutoLabs/PyAutoHands#228 added a static check that flags any
MultiStart*search constructed without an explicitbatch_size. Defaulting toNoneis exactly how both workspaces'interferometer/start_here.pyinherited an unbounded 48-way vmap on the same day and took down two nightly release-integrate runs.Run against this tree, the checker found four further sites beyond the interferometer one fixed in #204:
scripts/cluster/start_here.py:239scripts/guides/modeling/searches.py:131scripts/imaging/start_here.py:314scripts/multi_galaxy/start_here.py:221Behaviour is unchanged
batch_size=Noneis already the default, so nothing changes at runtime. What changes is that the choice is written down where a reviewer sees it, with a pointer to the knob if a reader hits a memory limit.Why not a bounded value
These are CCD imaging, cluster, multi-galaxy and guide likelihoods, not interferometer ones — unbatched is probably both fine and faster. Picking a real number needs a measurement on hardware this change could not make, and a number nobody measured is worse than an honest default.
scripts/imaging/start_here.pyis the one most worth profiling later: it is a user-facing entry point atn_starts=48, and whether that fits a laptop GPU is unknown here.Scripts changed
Four, one line each; notebooks regenerated to match (byte-preserving insert into the matching code cell, each re-verified as valid JSON).
scripts/check_sizes.shpasses. The checker reports the tree clean afterwards.Merge before PyAutoLabs/PyAutoHands#229, which turns the check into a required job.
Generated by Claude Code