Skip to content

fix(ep): staleness mask tracks projection rejection, not numerical change - #1580

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ep-stale-mask-fixed-point
Sep 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/ep-stale-mask-fixed-point

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

PR #1576 added per-(factor, variable) staleness reporting and a reverted_variables column in ep_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 converged EPMeanField emitted STALE FACTORS for every factor and listed the variable on every history row while every update was SUCCESS. Unchanged does not imply rejected.

Status.changed now means "this update accepted this variable's projection". The valid branch marks every variable accepted; the invalid branch builds the mask from the check_valid() result already computed, before update_invalid runs. updated stays 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.changed semantics tighten from "moved numerically" to "projection accepted"; no public signature changes. The reverted_variables column and STALE FACTORS warning are now silent on converged graphs.
See full details below.

Test Plan

  • pytest test_autofit/graphical green (was 278 on main; +1 regression test)
  • New test_restart_from_fixed_point_is_not_stale: EP restarted from a converged mean field emits no stale warnings, every row SUCCESS, reverted_variables empty on every row
  • Existing partial-revert and always-reverting tests still pass unchanged (only the docstring premise of the history test was rewritten)
Full API Changes (for automation & release notes)

Removed

  • None

Added

  • None

Changed

  • autofit.graphical.mean_field.Status.changed now reports projection acceptance per variable, not numerical movement. ep_history.csv reverted_variables and the STALE FACTORS warning inherit the corrected meaning.

Migration

  • None required.

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_019AymyDrfMhYj4vNgVMjNbq

…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
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 8, 2026
@Jammy2211
Jammy2211 merged commit 08207ba into main Sep 8, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/ep-stale-mask-fixed-point branch September 8, 2026 14:15
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 26, 2026
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.

fix(ep): fixed-point projections are not stale

1 participant