Skip to content

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

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#132
Jammy2211 merged 1 commit into
mainfrom
claude/interferometer-oom-nufft-yyz98z

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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 evaluates every start in a single jax.vmap, materializing the whole batched value_and_grad — which is how two workspace interferometer scripts inherited an unbounded 48-way vmap and OOMed two nightly release runs.

One site here: scripts/searches/mle.py:245 (MultiStartAdam, n_starts=16).

Behaviour is unchanged

batch_size=None is already the default, so nothing changes at runtime. The choice is now written down where a reviewer sees it, with a pointer to the knob if a reader hits a memory limit.

This is a 1D toy likelihood at 16 starts, so no bounded value is warranted — the annotation exists so the next author makes the decision deliberately rather than inheriting it.

Scripts changed

  • scripts/searches/mle.py — one line; notebooks/searches/mle.ipynb regenerated to match (byte-preserving insert, re-verified as valid JSON)

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 two
workspace interferometer scripts inherited an unbounded 48-way vmap and
OOMed nightly release runs (PyAutoLabs/PyAutoFit#1452).

Behaviour is unchanged - None is already the default. 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. This is a 1D toy
likelihood at 16 starts, so no bounded value is warranted.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0171voyyTrr91hJ3vU5AjeVz
@Jammy2211
Jammy2211 merged commit 681a404 into main Aug 5, 2026
5 checks passed
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