complete: natural-logpdf-clamps-neginf (PyAutoFit#1534) - #352
Merged
Conversation
The loose end noted in PyAutoFit#1532's Shipped comment and not filed at the time. `AbstractMessage.natural_logpdf` reduced through `nan_to_num(..., nan=-inf)` with `posinf`/`neginf` left at their defaults, so a genuine `-inf` became `-1.7976931348623157e+308` -- the opposite of the call's intent, for the inputs that already had the right answer. Measured: LogGaussianPrior(0.4, 1.3).message.logpdf(0.0) was exactly -sys.float_info.max, while logpdf(-1.0) was -inf. The asymmetry is the proof of mechanism -- log(0) is -inf and gets clamped, log(-1) is NaN and is mapped correctly. It matters because -1.8e308 is finite, and isfinite is what optax.apply_if_finite and non_linear/clipper.py branch on to detect a lane leaving the prior support. Issued as PyAutoFit#1533; PR PyAutoFit#1534 is open and NOT merged -- its two JAX CI legs have been in "Run tests" for over an hour while the nojax leg passed in 58s, which is unresolved. The prompt stays in draft/ until that is settled. Dashboard regenerated; intake dashboard --check current; lifecycle.py check OK. Co-Authored-By: Claude <noreply@anthropic.com>
PyAutoFit#1534 merged as 5c391fd; issue #1533 closed. Record written, prompt folded out of active/. natural_logpdf called nan_to_num with nan=-inf but default posinf/neginf, so a genuine -inf became -1.7976931348623157e+308 -- the opposite of the call's intent, for the inputs that already had the right answer. It matters because that value is finite, and isfinite is what optax.apply_if_finite and non_linear/clipper.py branch on to detect a lane leaving the prior support. Also repoints draft/research/graphical_ep/transformed_message_declares_support.md, which carried this as an open, "probably harmless" observation and whose measurement table's 0.0 row is now stale. Its conclusion is unaffected -- EP was protected by the -inf at negative values, not by the 0.0 row -- but the prompt now says so rather than leaving a falsified number for the next reader. complete/index.md refreshed (1160 records), dashboard regenerated, intake dashboard --check current, lifecycle.py check OK. Co-Authored-By: Claude <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
Mind state for the last task in the
loggaussian-prior-supportlineage. Two commits, no code.1. Filed (
6965533).draft/bug/priors/natural_logpdf_clamps_neginf.md— the loose end noted in PyAutoFit#1532's Shipped comment and not filed at the time.2. Completed (
4545add). PyAutoFit#1534 merged as5c391fd, issue #1533 closed; record written, prompt retired.What the bug was
AbstractMessage.natural_logpdfcallednan_to_numwithnan=-infbut defaultposinf/neginf, so a genuine-infwas clamped to-1.7976931348623157e+308. The call did the opposite of its intent for exactly the inputs that already had the right answer.The asymmetry is what named the mechanism, on
LogGaussianPrior(0.4, 1.3):Two out-of-support points, two different answers, from one line — and the clamped value is exactly
-sys.float_info.max. It matters because that value is finite, andisfiniteis whatoptax.apply_if_finiteandnon_linear/clipper.pybranch on to detect a lane leaving the prior support.Sweep
draft/research/graphical_ep/transformed_message_declares_support.mdcarried this as an open, "probably harmless, unverified" observation, and its measurement table's0.0row is now stale onmainfrom5c391fd. Repointed to the fix and the record, with a note to re-run the probe rather than trust the printed value.The prompt's conclusion is unaffected — EP was protected by the message returning a clean
-infat negative values, which is the row that mattered, not the0.0row — so it stays open at its reduced priority rather than being retired.A process note in the record
complete/2026/08/natural-logpdf-clamps-neginf.mdcloses with three stale-API misreadings from this session's CI waits, because they cost more time than the fix did. GitHub's PR check endpoints repeatedly served data an hour behind reality, producing one false "stall", one false "no CI configured", and one false hang diagnosis that wrongly implicated the fix itself. The reliable read islist_workflow_jobswith per-stepcompleted_attimestamps, compared against elapsed wall-clock.Checks
lifecycle.py check— OKlifecycle.py index --check— OK (1160 records)intake dashboard --check—dashboard.md + dashboard.html are currentGenerated by Claude Code