Skip to content

fix: end search.summary with a 'Resampling Info' section - #1554

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/resampling-info-summary-section
Sep 1, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/resampling-info-summary-section

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Closes #1551.

Summary

The gradient searches' resampling diagnostics (Resurrections, Value/Gradient-NaN Lane-Step counts and rates, Constrained Lane-Steps) were emitted in the middle of search.summary, between the sample counts and the timing lines. They now close the file: one blank line after the timing/visualization lines, a Resampling Info subheader, then the lines — as requested verbatim in the prompt. The block is extracted into _resampling_summary_from and appended by search_summary_to_file; every emit-nothing guard is unchanged, so a search without the counters (e.g. Nautilus) writes a byte-identical summary.

API Changes

None — internal output-format change only. No symbols added, removed, or re-signatured; search_summary_from_samples (not exported from autofit/__init__.py, no external callers) no longer includes the resampling lines, which are appended at file level instead.
See full details below.

Test Plan

  • Full PyAutoFit suite: 2328 passed, 44 skipped, 0 failed (single-process; -n auto hits a pre-existing xdist collection-ID instability in test_prior_properties.py, unrelated to this diff)
  • test_autofit/text/test_text_util.py: 12 passed, including a new Witness-shaped end-of-file ordering test
  • autofit_workspace curated smoke subset: 8/8 PASS (mcmc.py first failed on the container missing optional zeus-mcmc; passed after installing the pinned optional samplers — environment gap, not this diff)
  • Witness observed on a real smoke run: the MultiStartAdam search.summary ends Visualization Time (seconds) = …, blank line, Resampling Info, then the six lines; the LBFGS summary (no counters) is unchanged
Full API Changes (for automation & release notes)

Changed Behaviour

  • autofit.text.text_util.search_summary_from_samples — no longer emits the resampling lines (Clipper/Scaler lines unchanged); they are appended by search_summary_to_file.
  • search.summary layout — for searches carrying the resampling counters, the file now ends with a blank line, a Resampling Info subheader, and the six resampling lines. Searches without the counters write byte-identical files (verified differentially against origin/main's module).

Added

  • autofit.text.text_util._resampling_summary_from(samples_info) — private helper holding the moved block, guards preserved verbatim.

Migration

  • None. No parser of search.summary exists in the organism (grepped); human readers find the diagnostics at the bottom of the file.

Validation checklist (--auto run — plan was not pre-approved)

  • Effective level: supervised (header: safe, cap: bug → supervised); batch 2026-08-31-pm, member autofit-resampling-info
  • Plan: on the issue (fix: end search.summary with a 'Resampling Info' section #1551), written at start, unmodified since
  • Gate: tests 2328 passed / 44 skipped (downstream library suites n/a — no removed/renamed/changed-signature symbols) · smoke autofit_workspace subset 8/8 PASS (the other five workspaces are not runnable in this web container — no lens-stack checkouts; the batch record's expected-effects line for this member already anticipates search.summary-format smoke-pin staleness) · review CLEAN — claim "every emit-nothing guard is unchanged / byte-identical summary" → basis-cited: test__search_summary__nan_counters_absent_for_other_searches + file-level no-section assertion · Heart STALE score 35 (stale reasons: five library statuses unknown, no test report.json in this container; shift heart-ack per batch record: manifest drift 1 mismatch, CI-status measurement blindness) · adversary CLEAN (independent model; witness basis-cited by an end-to-end exact-tail run, byte-identical claim by differential old-vs-new module runs across four no-counter configurations)
  • Human: plan sound in hindsight?
  • Human: diff matches plan (no scope creep)?
  • Human: merge, amend, or reject — then log the outcome

Flagged decision (decide-and-flag, batch launch — one per PR)

  • Gate: ship PR sign-off at effective level supervised (the bug work-type cap clamps the prompt's safe header).
  • Decision taken: open this PR rather than park awaiting-input, so it is reviewable in the 2026-08-31-pm slot (three PyAutoFit members merge serially at review; this one first).
  • Rejected alternative: park at the ship checkpoint with the branch pushed and a batched question on fix: end search.summary with a 'Resampling Info' section #1551, costing the shift.
  • One-command revert: close this PR — merge stays a human act at every level, so nothing lands without the reviewer.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_017qZxCvpS4on7XtUe4cxyxr


Generated by Claude Code

…ummary

The gradient searches' resampling diagnostics (Resurrections, the NaN
lane-step counts and rates, Constrained Lane-Steps) were emitted between
the sample counts and the timing lines. They now close the file: one
blank line after the timing/visualization lines, a 'Resampling Info'
subheader, then the lines. Every emit-nothing guard is unchanged — a
search without the counters writes a byte-identical summary.

PyAutoFit#1551

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017qZxCvpS4on7XtUe4cxyxr
@Jammy2211 Jammy2211 added pending-release PR queued for the next release build decision-taken labels Aug 31, 2026 — with Claude
@Jammy2211
Jammy2211 merged commit 7c1bf4c into main Sep 1, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/resampling-info-summary-section branch September 1, 2026 19:34
Jammy2211 pushed a commit that referenced this pull request Sep 1, 2026
…verlap with #1554

Keep this PR's composition label, Total Steps and Stop Reason lines in
search_summary_from_samples; drop the inline resampling lines, which #1554
moved to the end-of-file Resampling Info section. Targeted suites green
(text_util 25 pass, mle 131 pass).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qj5UN31m3FSCxzgp5jTrPj
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: end search.summary with a 'Resampling Info' section

2 participants