Skip to content

docs: make the multi-start batch_size decision explicit - #205

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/interferometer-oom-nufft-yyz98z
Aug 5, 2026
Merged

docs: make the multi-start batch_size decision explicit#205
Jammy2211 merged 1 commit into
mainfrom
claude/interferometer-oom-nufft-yyz98z

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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 explicit batch_size. Defaulting to None is exactly how both workspaces' interferometer/start_here.py inherited 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:239
  • scripts/guides/modeling/searches.py:131
  • scripts/imaging/start_here.py:314
  • scripts/multi_galaxy/start_here.py:221

Behaviour is unchanged

batch_size=None is 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.py is the one most worth profiling later: it is a user-facing entry point at n_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.sh passes. The checker reports the tree clean afterwards.

Merge before PyAutoLabs/PyAutoHands#229, which turns the check into a required job.


Generated by Claude Code

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
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