Repository navigation
samplers: key the tier-gap rule on exported search classes (search-extensibility A0c) - #502
Merged
Merged
Conversation
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>
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
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__.pyimports plus_LAZY_ATTRSwithout importing the package, each class gets one row, an integration script counts for a class when its stem (with_jaxand thesearches_minimalvariant suffixes_mlp/_profile/_sweepstripped) matches the class name, and archive folders whose name is also a promoted class are dropped.Tier gaps before: three spurious
nautilus_*promotion candidates plusdrawerandmulti_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 ruleagents/faculties/samplers/AGENTS.md— tier block describes the new ruletests/test_samplers_surface.py— 3 new testsTest Plan
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 samplerstier-gaps section as described aboveGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code