Skip to content

refactor: remove the NSS nested sampler and its [nss] extra#1357

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/remove-nss-sampler
Jul 11, 2026
Merged

refactor: remove the NSS nested sampler and its [nss] extra#1357
Jammy2211 merged 1 commit into
mainfrom
feature/remove-nss-sampler

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Removes the NSS nested slice sampler (af.NSS) and all of its supporting machinery. The bespoke git+ install / CI / build apparatus it required was never justified by its measured performance (mixed — faster per-eval on MGE but OOM-prone on pixelization/Delaunay via vmap fan-out); it can return later as a genuine PyPI install. The full implementation is preserved for re-mainlining (see below).

Closes the PyAutoFit slice of #1356.

API Changes

  • Removed public API: af.NSS (and the autofit/non_linear/search/nest/nss/ module: search.py, samples.py, _chunked_nss.py, _chunked_update.py).
  • Removed the [nss] optional-dependency extra (the git+ direct-URL footgun) and its install notes from pyproject.toml + AGENTS.md.
  • blackjax>=1.2.0 retained in [optional]af.BlackJAXNUTS uses it. No other public API changes.

Preserved for reuse

The working implementation is stashed in autofit_workspace_developer/searches/nss/ (companion PR) — module relativized as a drop-in, tests verbatim, README with the pinned handley-lab/blackjax + yallup/nss SHAs and a re-mainline checklist.

Validation

  • test_autofit/: 1471 passed, 1 skipped, 0 failed.
  • Downstream autogalaxy + autolens import cleanly against the NSS-removed autofit; af.NSS confirmed gone; grep-clean of any NSS reference in both.
  • Review faculty: CLEAN. Heart: YELLOW (pre-existing ambient reasons, none NSS-related; acknowledged by maintainer at ship).

Reviewer checklist

  • af.NSS removal is intended (returns later as a real pip package)
  • blackjax correctly retained for NUTS

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y9eyGoEAUHGSqcmJpzzjsi

Removes af.NSS and the autofit/non_linear/search/nest/nss module, its tests,
the [nss] optional-dependency extra (the git+ direct-URL footgun) and the
AGENTS.md install notes. The bespoke install/CI/build machinery NSS required
was not justified by its measured performance; it can return as a genuine pip
install later. The implementation is preserved verbatim in
autofit_workspace_developer/searches/nss/ for re-mainlining.

Public API removal: af.NSS. blackjax stays (BlackJAXNUTS uses it).

Issue: #1356

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant