Overview
NSS (the JAX-native Nested Slice Sampler, af.NSS) was integrated as a first-class sampler, but it dragged a bespoke install/CI/build apparatus in with it: a [nss] extra whose real dependencies (handley-lab/blackjax fork + yallup/nss) can't be declared as git+ direct URLs in an uploaded wheel, a manual post-install step, a dedicated unittest_nss job and test-ignore in the release workflow, a Heart CI-status fixture, and a Required-by: nss arviz footgun. Measured performance never justified that complexity (mixed at best — faster per-eval on MGE but OOM-prone on pixelization/Delaunay via vmap fan-out), and the sampler can return later as a genuine PyPI package. This task removes NSS and all of its supporting infrastructure across six repos.
Plan
- Delete the
af.NSS sampler module, its tests, its [nss] extra, and the AGENTS.md footgun note from PyAutoFit (library root — this removes a public API).
- Strip the NSS tutorial section from the autofit_workspace
searches/nest example (script + regenerated notebook).
- Remove NSS special-casing from PyAutoBuild's release workflow (the git+ direct-URL footgun guard, the separate
unittest_nss job, the --ignore=…/nss test skip).
- Remove NSS references from PyAutoHeart (the "nss install smoke" CI-status fixture and the
release_validation doc).
- Retire the NSS profiling runs in autolens_profiling (delete the
searches/nss/ subtree, de-register it from the sweep/samplers), keeping the historical results/notes as evidence.
- Annotate the PyAutoMind
nss_first_class_sampler epic as retired and void its outstanding issued/nss_* follow-up prompts.
- Phase into per-repo PRs, library-first (PyAutoFit merges before the workspace).
Detailed implementation plan
Affected Repositories
- PyAutoFit (primary)
- autofit_workspace
- PyAutoBuild
- PyAutoHeart
- autolens_profiling
- PyAutoMind
Branch Survey
| Repository |
Current Branch |
Dirty? |
| ./PyAutoFit |
main |
clean |
| ./autofit_workspace |
main |
dirty (231 — build outputs; isolated by worktree) |
| ./PyAutoBuild |
main |
clean |
| ./PyAutoHeart |
main |
clean |
| ./autolens_profiling |
main |
dirty (14 — profiling outputs; isolated by worktree) |
| ./PyAutoMind |
tmp-land-navigator |
dirty (1 — this prompt) |
Suggested branch: refactor/remove-nss-sampler
Implementation Steps
Phase 1 — PyAutoFit (library; gates the rest):
git rm -r autofit/non_linear/search/nest/nss/ and test_autofit/non_linear/search/nest/nss/.
autofit/__init__.py — remove from .non_linear.search.nest.nss.search import NSS.
pyproject.toml — remove the [nss] comment block + nss = ["fastprogress<1.1"] extra (~lines 78–106). KEEP blackjax>=1.2.0 in [optional] (the NUTS search uses it).
AGENTS.md — remove the [nss] footgun bullet; drop "NSS" from the nested-sampler subsystem list.
- Tests: full
test_autofit/; because af.NSS is a public-API removal, leg-1 also runs PyAutoGalaxy + PyAutoLens suites (neither references NSS — expected green).
Phase 2 — autofit_workspace (user-facing tutorial; after Phase 1):
scripts/searches/nest.py — remove the NSS intro paragraphs and the Search: NSS section (~lines 10–44 intro refs + 300–391); confirm the Dynesty/Nautilus examples still run standalone.
- Regenerate
notebooks/searches/nest.ipynb from the edited script.
- Smoke: run the trimmed
nest.py.
Phase 3 — PyAutoBuild (release CI):
.github/workflows/release.yml — remove the [nss] git+ direct-URL footgun guard (~130–165), the separate unittest_nss job/handling, and the --ignore=test_autofit/non_linear/search/nest/nss skip (~250–256). No test dir → gate leg-1 n/a.
Phase 4 — PyAutoHeart:
tests/test_ci_status.py — remove the "nss install smoke" fixture entry; adjust assertions.
docs/release_validation.md — remove the [nss] wheel-blind-spot reference.
- Tests: PyAutoHeart suite.
Phase 5 — autolens_profiling (dev repo; doc-light):
git rm -r searches/nss/ (9 files).
searches/sweep.py — remove the 9 ("nss", …) tuples.
searches/_samplers.py — remove the NSS-specific defaults; _setup.py/_runner.py — remove nss dispatch.
- Clean nss mentions in
README.md, hpc/README.md, skills/profile_likelihood/reference.md. Keep results/notes (historical A100 evidence).
Phase 6 — PyAutoMind (registry housekeeping):
- Annotate
z_features/complete/nss_first_class_sampler.md as retired/superseded.
- Mark the ~8
issued/nss_* prompts void (moot once NSS is gone).
Testing approach
Per-repo suites (PyAutoFit + downstream libs, PyAutoHeart), workspace smoke for nest.py, and a final grep -ri nss sweep across all six repos to confirm no dangling af.NSS references remain.
Key Files
PyAutoFit/autofit/non_linear/search/nest/nss/ — the sampler module (deleted)
PyAutoFit/autofit/__init__.py — af.NSS export (removed)
PyAutoFit/pyproject.toml — [nss] extra + git+ notes (removed)
PyAutoBuild/.github/workflows/release.yml — NSS install/test special-casing (removed)
PyAutoHeart/tests/test_ci_status.py, PyAutoHeart/docs/release_validation.md
autofit_workspace/scripts/searches/nest.py — NSS tutorial section (removed)
autolens_profiling/searches/nss/, searches/sweep.py, searches/_samplers.py
Autonomy
--auto, effective level SUPERVISED (refactor cap safe ∧ header supervised; a 6-repo public-API removal). Per-repo ship sign-offs are batched into a consolidated question on this issue; the run ends short of PR-open and merge stays human.
Original Prompt
Click to expand starting prompt
Refactor: remove the NSS nested sampler from PyAutoFit and retire all its supporting infrastructure across the organism. Delete the autofit/non_linear/search/nest/nss module, the af.NSS export, the [nss] git+ direct-URL extra in pyproject.toml, and its tests. Strip the NSS handling out of PyAutoBuild's release.yml (the git+ footgun guard, the separate unittest_nss job, the nss test-dir ignore) and remove the NSS references from PyAutoHeart (the nss install smoke CI fixture and release_validation docs). Sweep the autofit/autolens workspace examples and tutorials, retire the autolens_profiling NSS runs, and close out the PyAutoMind nss_first_class_sampler epic and its issued prompts. NSS performance never warranted this infrastructure cost and it can return as a genuine pip install later; we no longer support it.
Overview
NSS (the JAX-native Nested Slice Sampler,
af.NSS) was integrated as a first-class sampler, but it dragged a bespoke install/CI/build apparatus in with it: a[nss]extra whose real dependencies (handley-lab/blackjaxfork +yallup/nss) can't be declared asgit+direct URLs in an uploaded wheel, a manual post-install step, a dedicatedunittest_nssjob and test-ignore in the release workflow, a Heart CI-status fixture, and aRequired-by: nssarviz footgun. Measured performance never justified that complexity (mixed at best — faster per-eval on MGE but OOM-prone on pixelization/Delaunay via vmap fan-out), and the sampler can return later as a genuine PyPI package. This task removes NSS and all of its supporting infrastructure across six repos.Plan
af.NSSsampler module, its tests, its[nss]extra, and the AGENTS.md footgun note from PyAutoFit (library root — this removes a public API).searches/nestexample (script + regenerated notebook).unittest_nssjob, the--ignore=…/nsstest skip).release_validationdoc).searches/nss/subtree, de-register it from the sweep/samplers), keeping the historical results/notes as evidence.nss_first_class_samplerepic as retired and void its outstandingissued/nss_*follow-up prompts.Detailed implementation plan
Affected Repositories
Branch Survey
Suggested branch:
refactor/remove-nss-samplerImplementation Steps
Phase 1 — PyAutoFit (library; gates the rest):
git rm -r autofit/non_linear/search/nest/nss/andtest_autofit/non_linear/search/nest/nss/.autofit/__init__.py— removefrom .non_linear.search.nest.nss.search import NSS.pyproject.toml— remove the[nss]comment block +nss = ["fastprogress<1.1"]extra (~lines 78–106). KEEPblackjax>=1.2.0in[optional](the NUTS search uses it).AGENTS.md— remove the[nss]footgun bullet; drop "NSS" from the nested-sampler subsystem list.test_autofit/; becauseaf.NSSis a public-API removal, leg-1 also runs PyAutoGalaxy + PyAutoLens suites (neither references NSS — expected green).Phase 2 — autofit_workspace (user-facing tutorial; after Phase 1):
scripts/searches/nest.py— remove the NSS intro paragraphs and theSearch: NSSsection (~lines 10–44 intro refs + 300–391); confirm the Dynesty/Nautilus examples still run standalone.notebooks/searches/nest.ipynbfrom the edited script.nest.py.Phase 3 — PyAutoBuild (release CI):
.github/workflows/release.yml— remove the[nss]git+ direct-URL footgun guard (~130–165), the separateunittest_nssjob/handling, and the--ignore=test_autofit/non_linear/search/nest/nssskip (~250–256). No test dir → gate leg-1 n/a.Phase 4 — PyAutoHeart:
tests/test_ci_status.py— remove the "nss install smoke" fixture entry; adjust assertions.docs/release_validation.md— remove the[nss]wheel-blind-spot reference.Phase 5 — autolens_profiling (dev repo; doc-light):
git rm -r searches/nss/(9 files).searches/sweep.py— remove the 9("nss", …)tuples.searches/_samplers.py— remove the NSS-specific defaults;_setup.py/_runner.py— remove nss dispatch.README.md,hpc/README.md,skills/profile_likelihood/reference.md. Keep results/notes (historical A100 evidence).Phase 6 — PyAutoMind (registry housekeeping):
z_features/complete/nss_first_class_sampler.mdas retired/superseded.issued/nss_*prompts void (moot once NSS is gone).Testing approach
Per-repo suites (PyAutoFit + downstream libs, PyAutoHeart), workspace smoke for
nest.py, and a finalgrep -ri nsssweep across all six repos to confirm no danglingaf.NSSreferences remain.Key Files
PyAutoFit/autofit/non_linear/search/nest/nss/— the sampler module (deleted)PyAutoFit/autofit/__init__.py—af.NSSexport (removed)PyAutoFit/pyproject.toml—[nss]extra + git+ notes (removed)PyAutoBuild/.github/workflows/release.yml— NSS install/test special-casing (removed)PyAutoHeart/tests/test_ci_status.py,PyAutoHeart/docs/release_validation.mdautofit_workspace/scripts/searches/nest.py— NSS tutorial section (removed)autolens_profiling/searches/nss/,searches/sweep.py,searches/_samplers.pyAutonomy
--auto, effective level SUPERVISED (refactor capsafe∧ headersupervised; a 6-repo public-API removal). Per-repo ship sign-offs are batched into a consolidated question on this issue; the run ends short of PR-open and merge stays human.Original Prompt
Click to expand starting prompt
Refactor: remove the NSS nested sampler from PyAutoFit and retire all its supporting infrastructure across the organism. Delete the autofit/non_linear/search/nest/nss module, the af.NSS export, the [nss] git+ direct-URL extra in pyproject.toml, and its tests. Strip the NSS handling out of PyAutoBuild's release.yml (the git+ footgun guard, the separate unittest_nss job, the nss test-dir ignore) and remove the NSS references from PyAutoHeart (the nss install smoke CI fixture and release_validation docs). Sweep the autofit/autolens workspace examples and tutorials, retire the autolens_profiling NSS runs, and close out the PyAutoMind nss_first_class_sampler epic and its issued prompts. NSS performance never warranted this infrastructure cost and it can return as a genuine pip install later; we no longer support it.