feat: clipper enters the MLE search identifiers - #1494
Merged
Conversation
Add __identifier_fields__ = ("clipper",) to AbstractMultiStartGradient
and AbstractBFGS so runs differing only in prior-support enforcement no
longer collide on one output directory. Scoped to the clipper-consuming
searches: nested samplers, MCMC searches and Drawer are untouched and
their identifiers are pinned byte-identical by new regression tests,
including a tripwire that fails if clipper is ever hoisted within their
reach.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012ifYaS7vcVWptamayY9umv
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
Closes #1493. The prior-support
Clipper(#1477) did not enter the search identifier, so two runs differing only in prior-support enforcement — which demonstrably changes the answer — shared one output directory, and with the.completedshort-circuit the later run silently returned the earlier one's numbers (this bit the phase-2 validation campaign, which worked around it with unique per-arm names). Per the decision recorded in PyAutoMind (2026-08-18): the clipper now forks the identifier on the two search families that consume one, and nothing else re-keys.__identifier_fields__ = ("clipper",)is added toAbstractMultiStartGradientandAbstractBFGS— the entire source change.Drawer(inherits the attribute but never consumes it), the nested samplers, and the MCMC searches are untouched: their identifiers are byte-for-byte identical, pinned by new regression tests whose hash lists were captured onmainat c302f51 before the change.Behaviour change to state in release notes: every existing
MultiStart*/BFGS/LBFGSoutput directory re-keys, including default-ClipperNoneruns (the hash gains theclipperfield itself). Stored results are orphaned on disk, not deleted; re-running recomputes into a fresh directory. Nested-sampling and MCMC results are unaffected.API Changes
No public API surface changes — no signatures, classes, or modules added or removed. The observable change is output-directory identifiers for the MLE gradient searches:
MultiStartAdam/MultiStartADABelief/MultiStartLion/MultiStartProdigy/BFGS/LBFGS: identifier now includes the clipper (ClipperNonevsClipperPriorBox, including itsmargin), so all existing output directories for these searches re-key.Nautilus,DynestyStatic,DynestyDynamic,Emcee,Zeus, NUTS,Drawer: identifiers unchanged (regression-pinned).See full details below.
Test Plan
test_autofit/database/identifier/test_identifiers.py— 29 passed (23 existing incl. the untouchedtest_dynesty_staticpin + 6 new)Nautilus/DynestyDynamic/Emcee/Zeushash lists captured onmain@ c302f51 before the change, asserted afterclipperattribute — fails loudly if a refactor hoistsclipperfromAbstractMLEtowardNonLinearSearchClipperNone;ClipperPriorBoxforks; different margins fork;Drawerignores the clippertest_nautilus.py::test__single_core_builds_no_pool, the environment-specific failure documented incomplete/2026/08/prior-support-clipper.md(passes in CI, fails in local venvs, reproduced identically on a clean tree here)Full API Changes (for automation & release notes)
Removed
Added
AbstractMultiStartGradient.__identifier_fields__ = ("clipper",)— clipper forks the multi-start identifier.AbstractBFGS.__identifier_fields__ = ("clipper",)— clipper forks the (L)BFGS identifier.Migration
Question for the reviewer
Because these searches'
__identifier_fields__was empty, only their class name hashed until now —n_starts,total_steps,learning_rateetc. also collide today. This PR re-keys the MLE directories anyway, so widening the tuple in the same release would pay the orphaning cost once instead of twice. Kept out of this PR per one-prompt-one-task; say the word and it gets filed as its own follow-up (or folded in here).Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_012ifYaS7vcVWptamayY9umv
Generated by Claude Code