Skip to content

feat: clipper enters the MLE search identifiers - #1494

Merged
Jammy2211 merged 1 commit into
mainfrom
claude/clipper-search-identifier-4cowi2
Aug 18, 2026
Merged

feat: clipper enters the MLE search identifiers#1494
Jammy2211 merged 1 commit into
mainfrom
claude/clipper-search-identifier-4cowi2

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

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 .completed short-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 to AbstractMultiStartGradient and AbstractBFGS — 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 on main at c302f51 before the change.

Behaviour change to state in release notes: every existing MultiStart* / BFGS / LBFGS output directory re-keys, including default-ClipperNone runs (the hash gains the clipper field 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 (ClipperNone vs ClipperPriorBox, including its margin), 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 untouched test_dynesty_static pin + 6 new)
  • New pins: Nautilus / DynestyDynamic / Emcee / Zeus hash lists captured on main @ c302f51 before the change, asserted after
  • New tripwire: nested samplers have no clipper attribute — fails loudly if a refactor hoists clipper from AbstractMLE toward NonLinearSearch
  • New separation tests: default == explicit ClipperNone; ClipperPriorBox forks; different margins fork; Drawer ignores the clipper
  • Full suite on Python 3.13: 1864 passed, 4 skipped, 1 failed — test_nautilus.py::test__single_core_builds_no_pool, the environment-specific failure documented in complete/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

  • None.

Added

  • AbstractMultiStartGradient.__identifier_fields__ = ("clipper",) — clipper forks the multi-start identifier.
  • AbstractBFGS.__identifier_fields__ = ("clipper",) — clipper forks the (L)BFGS identifier.

Migration

  • No code changes required. Existing multi-start / (L)BFGS output directories are orphaned (not deleted): a re-run with the same config recomputes into a new identifier directory. To keep using an old result, load it explicitly by path. Nested-sampling / MCMC output directories resolve exactly as before.

Question for the reviewer

Because these searches' __identifier_fields__ was empty, only their class name hashed until now — n_starts, total_steps, learning_rate etc. 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

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
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Aug 18, 2026 — with Claude
@Jammy2211
Jammy2211 merged commit f3767a7 into main Aug 18, 2026
3 checks passed
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.

feat: put the clipper in the search identifier (MLE searches only)

2 participants