Repository navigation
fix(ep): staleness mask tracks projection rejection, not numerical change - #1580
Merged
Merged
Conversation
…ange (#1579) An accepted projection that lands on its own fixed point reproduces its message bit-for-bit, so the per-variable `changed` mask from #1576 counted a healthy update as reverted: EP restarted from a converged EPMeanField emitted STALE FACTORS and filled reverted_variables on every row while every update was SUCCESS. The valid branch now marks every variable accepted; the invalid branch builds the mask from check_valid() before update_invalid. `updated` keeps the numerical comparison so #1574's fully-reverted = skipped stands. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019AymyDrfMhYj4vNgVMjNbq
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
PR #1576 added per-(factor, variable) staleness reporting and a
reverted_variablescolumn inep_history.csv, but the per-variable mask was a numerical-difference test (bit-exact equality of natural parameters against the previous message), not a rejection test. An accepted projection that lands on its own fixed point reproduces its message exactly, so a healthy update was counted as "reverted": EP restarted from its convergedEPMeanFieldemittedSTALE FACTORSfor every factor and listed the variable on every history row while every update wasSUCCESS. Unchanged does not imply rejected.Status.changednow means "this update accepted this variable's projection". The valid branch marks every variable accepted; the invalid branch builds the mask from thecheck_valid()result already computed, beforeupdate_invalidruns.updatedstays on the numerical comparison, so #1574's "fully reverted counts as skipped" classification is unchanged. The stale-factor report and the diagnostics writer are untouched: the mask they consume now genuinely means "rejected".Closes #1579. Found by an external review of #1574/#1576/#1578.
API Changes
None — internal.
Status.changedsemantics tighten from "moved numerically" to "projection accepted"; no public signature changes. Thereverted_variablescolumn andSTALE FACTORSwarning are now silent on converged graphs.See full details below.
Test Plan
pytest test_autofit/graphicalgreen (was 278 on main; +1 regression test)test_restart_from_fixed_point_is_not_stale: EP restarted from a converged mean field emits no stale warnings, every rowSUCCESS,reverted_variablesempty on every rowFull API Changes (for automation & release notes)
Removed
Added
Changed
autofit.graphical.mean_field.Status.changednow reports projection acceptance per variable, not numerical movement.ep_history.csvreverted_variablesand theSTALE FACTORSwarning inherit the corrected meaning.Migration
Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_019AymyDrfMhYj4vNgVMjNbq