Skip to content

samplers: key the tier-gap rule on exported search classes (search-extensibility A0c) - #502

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/search-ext-a0c-fit-repair
Oct 8, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/search-ext-a0c-fit-repair

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Summary

Search-extensibility A0c part 1 (PyAutoFit#1668), Brain PR B. The samplers faculty tier-gap rule produced a false positive for MultiStart, false negatives for SMC and BFGS, and counted NSS twice because it keyed on package directory names. It now keys on the search classes PyAutoFit exports: the promoted tier is read from autofit/__init__.py imports plus _LAZY_ATTRS without importing the package, each class gets one row, an integration script counts for a class when its stem (with _jax and the searches_minimal variant suffixes _mlp/_profile/_sweep stripped) matches the class name, and archive folders whose name is also a promoted class are dropped.

Tier gaps before: three spurious nautilus_* promotion candidates plus drawer and multi_start_gradient. After: exactly the five promoted searches with no integration script (BFGS, Drawer, MultiStartADABelief, MultiStartLion, SMC), which are the five scripts the companion autofit_workspace_test PR adds; the section empties once that lands. NSS appears once; the archive lists pyswarms and ultranest only.

Scripts Changed

  • agents/faculties/samplers/_samplers.py — class-keyed promoted tier and gap rule
  • agents/faculties/samplers/AGENTS.md — tier block describes the new rule
  • tests/test_samplers_surface.py — 3 new tests

Test Plan

  • Samplers faculty tests 10 passed (7 existing + 3 new)
  • Full Brain suite 1273 passed; the one failure (test_grouped_organ_consumers::test_hygiene_map_and_heart_board_find_grouped_checkouts) fails identically with the change stashed in the task worktree and passes on the canonical checkout (worktree-layout effect)
  • bin/pyauto-brain samplers tier-gaps section as described above
  • CI green

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

Jammy2211 and others added 2 commits October 8, 2026 08:36
The SamplerSurface gap rule compared module-directory names with
integration-script stems, which broke wherever one directory holds several
searches: `mle/multi_start_gradient` was flagged although MultiStartAdam.py
exists, SMC hid behind BlackJAXNUTS in `mcmc/blackjax`, BFGS hid behind
LBFGS in `mle/bfgs`, and the re-mainlined NSS was listed as both archived
and promoted.

The promoted tier is now parsed from `autofit/__init__.py` (eager
`from .non_linear.search... import` lines plus `_LAZY_ATTRS`), one
`<group>/<pkg>/<Class>` row per exported search. Integration coverage
matches class against script stem with `_jax` and other variant suffixes
stripped; `searches_minimal` prototypes strip stacked suffixes including
`_mlp`, `_profile` and `_sweep`; archive directories that are promoted again
are dropped. Unit tests reproduce each trap.

Refs PyAutoLabs/PyAutoFit#1668 (search-extensibility A0c part 1, item 10).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The samplers-surface fixture named its fake library checkout 'PyAutoFit',
which the firewall counts as an instance fact in an unlisted file.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 896103a into main Oct 8, 2026
2 checks passed
@Jammy2211
Jammy2211 deleted the feature/search-ext-a0c-fit-repair branch October 8, 2026 08:05
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.

1 participant