Skip to content

prompt: record multistart-gradient-resume-fom-sanity-check as shipped - #187

Merged
Jammy2211 merged 4 commits into
mainfrom
claude/multistart-gradient-resume-fom-vvlcm0
Aug 15, 2026
Merged

prompt: record multistart-gradient-resume-fom-sanity-check as shipped#187
Jammy2211 merged 4 commits into
mainfrom
claude/multistart-gradient-resume-fom-vvlcm0

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Lifecycle bookkeeping for PyAutoFit#1474, merged as a0af8574 -> main.

Fitness.check_log_likelihood compared the log likelihood stored in a previous run's samples summary against fitness(parameters) — the figure of merit in the search's own convention. Those agree only when fom_is_log_likelihood=True and convert_to_chi_squared=False, so resuming any other search failed its sanity check on a completely unchanged likelihood function, making the multi-start resume path unusable.

What this PR does

  • advances the prompt draft/bug/autofit/multistart_gradient_resume_fom_sanity_check.md -> complete/2026/08/multistart-gradient-resume-fom-sanity-check.md, folding the original prompt into the record
  • regenerates complete/index.md (991 records) and dashboard.md
  • scripts/lifecycle.py check passes

No registry entry was removed because none existed — the task shipped straight from draft/ in a single remote session without a tracking issue, which the record states explicitly rather than leaving implicit.

Traps the record captures

The record is deliberately heavy on the things that would cost someone else time:

  • test_autofit/config/general.yaml sets check_likelihood_function: false. That is why the library suite never caught this bug and cannot catch a regression of it by default — any test touching the resume sanity check has to flip the flag on via fixture.
  • A GaussianPrior has log prior exactly 0.0 at its mean. A test parametrised over figure-of-merit conventions that evaluates at the prior means collapses the log-posterior conventions onto the log-likelihood one and passes against the unfixed code. The first draft of the test made exactly this mistake.
  • _broad_starts rejects any draw whose objective or gradient is non-finite, so a NaN trap placed at the edges of the prior is never reached — three verification runs reported counters of exactly 0 before this was spotted.
  • The GitHub get_check_runs API serves stale cached data. It froze all three CI jobs at in_progress long after they had finished, and acting on that reading a healthy mid-suite run was cancelled and had to be re-run. list_workflow_jobs / get_workflow_run are accurate, and get_workflow_run_usage gaining a run_duration_ms key is a reliable completion signal.

Follow-up, also closed

PyAutoFit#1472's n_value_nan_lane_steps / n_grad_nan_lane_steps counters were never demonstrable end-to-end because this bug killed every resume before the fit loop. Now verified — no bug, they accumulate correctly — and covered permanently by autofit_workspace_test#85, cited in the record.


Generated by Claude Code

claude added 4 commits August 15, 2026 03:04
PyAutoFit#1474 merged (a0af8574 -> main): `Fitness.check_log_likelihood`
compared a stored log likelihood against the search's own figure of merit, so
resuming any non-log-likelihood search failed on an unchanged likelihood
function.

Advances the prompt draft/bug/autofit/ -> complete/2026/08/, regenerates
complete/index.md and dashboard.md.

The record carries three traps worth keeping: the test config disables
`check_likelihood_function` (so the unit suite cannot catch a regression by
default), a GaussianPrior has log prior 0.0 at its mean (so a test evaluated
there passes against the unfixed code), and the GitHub `get_check_runs` API
serves stale data (a healthy CI run was cancelled on the strength of it).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JNbe6eLQbxUtY52EGqej5o
The counters accumulate correctly across a killed mid-run resume — no bug.
Covered permanently by a new autofit_workspace_test script.

Records two things worth reusing: `_broad_starts` rejects non-finite draws, so
a NaN trap at the edges of the prior is never reached and must sit on the
descent path; and the load-bearing assertion is equality with an uninterrupted
reference run, since a `>=` check accepts the injected regression.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JNbe6eLQbxUtY52EGqej5o
The end-to-end NaN-counter cover now has a PR to point at.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JNbe6eLQbxUtY52EGqej5o
autofit_workspace_test#85 merged as 69ee1305 -> main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JNbe6eLQbxUtY52EGqej5o
@Jammy2211
Jammy2211 merged commit 1f7cca8 into main Aug 15, 2026
2 checks passed
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.

2 participants