Repository navigation
docs: SLaM scripts pass one setup="auto" to every stage (5F PR2) - #690
Merged
Merged
Conversation
…res="auto" (5F PR2) Every SLaM script gets a __Compute Setup__ block (setup = "auto") passed to every stage's analysis, with settings_search number_of_cores="auto"; per-stage use_jax lines go. Interferometer SLaMs build the w-tilde sparse operator once up front (preload when present) and each pixelized stage's setup reuses it. multi_dataset simultaneous lets the factor graph follow the shared setup. Notebooks and catalogues regenerated. Part of #688 (likelihood-lifecycle phase 5F). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Likelihood-lifecycle phase 5F, PR2 of 3 (#688). Every SLaM script now passes one setup input,
setup = "auto", to every stage, and runs its searches withnumber_of_cores="auto". Each stage picks its own fastest setup. On a CPU the light-profile stage uses JAX on 1 worker and the pixelized stages use numba with a sparse operator on every core; on a GPU it's JAX throughout.Merge order and timing: merge after PR1 (#689), because the regenerated
workspace_index.json/llms-full.txtcross-referenceguides/advanced/auto_setup.py. Like PR1, merge with or after the library release carrying the automatic setup.Changes
scripts/guides/modeling/slam_start_here.py: a__Compute Setup__block aftersettings_search(setup = "auto"; how each stage picks; overrides via setup_id orPYAUTO_SETUP; link to the guide). Every stage function takessetup, everyal.Analysis*getssetup=setup, the per-stageuse_jax=Truelines are gone, andsettings_searchhasnumber_of_cores="auto". No model or science changes.independent.py/simultaneous.py, and interferometer:simultaneous.py:af.FactorGraphModel(..., use_jax=True)→af.FactorGraphModel(...), and the backend follows the factors' shared setup. The setup-agreement check passes.TransformerNUFFTdataset. The w-tilde sparse operator is built once up front, from thenufft_precision_operator.npypreload when present, and each pixelized stage's setup reuses it (Interferometer.apply_setupkeeps a matching attached operator). It is built once per run, not per stage; the light-profile stage chooses a dense NUFFT setup and doesn't use it.subhalo/sensitivity/slam_source_pixelized.py(owned by another task) andscripts/cluster/plot.py(PR Teach the family fit panels one by one using Pandora #687).slam_source_parametric.pygets the setup but keepsnumber_of_coresas is, because its sensitivity classes readsettings_search.number_of_coresand all its stages are JAX anyway.llms-full.txtandworkspace_index.jsonregenerated.Test Plan
draft/bug/autolens/dspl_slam_visualize_positions_inhomogeneous_shape.md(group/imaging double_source_plane_lens) anddraft/bug/autolens_workspace/slam_source_parametric_model_has_no_centre.md.pyauto-heart smoke autolensagainst this branch: 42/42 PASS (SLaM scripts aren't in the smoke list).scripts/check_sizes.sh: OK.Per-stage lines from
slam_start_here.py(8-core laptop, test mode):Switching from a JAX stage to a forked numba stage in one process was tested separately with real sampling (see the issue): there was no deadlock.
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code