Skip to content

feat: expose opt-in EP updater through declarative optimise - #1457

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ep-optimise-updater
Aug 8, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/ep-optimise-updater

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Expose the existing expectation-propagation updater hierarchy through the declarative FactorGraphModel.optimise() API.
An explicitly supplied updater is passed unchanged to EPOptimiser.
The default remains updater=None, preserving full, undamped updates via SimplerUpdater(delta=1.0).
Export updater classes from the public autofit and autofit.graphical namespaces.
Improve collapse diagnostics and documentation to frame damping as problem-dependent rather than a universal fix.

Closes #1456.

API Changes

FactorGraphModel.optimise() now accepts an optional updater keyword.
ApproxUpdater, DynamicUpdater, FactorUpdater, and SimplerUpdater are now available from autofit.
Omitting updater retains the existing undamped delta=1.0 behaviour; damping remains opt-in.
No migration is required for existing callers.
See full details below.

Test Plan

  • python -m pytest test_autofit/ -x -q — 1667 passed, 6 skipped
  • Focused declarative and diagnostic tests — 17 passed
  • python -m compileall and git diff --check
Full API Changes (for automation & release notes)

Added

  • autofit.ApproxUpdater — public base updater interface.
  • autofit.DynamicUpdater — public dynamically selected update policy.
  • autofit.FactorUpdater — public per-factor update policy.
  • autofit.SimplerUpdater — public fixed-delta update policy.
  • The same updater symbols are exported from autofit.graphical and autofit.graphical.expectation_propagation.

Changed Signature

  • autofit.FactorGraphModel.optimise(optimiser, paths=None, ep_history=None, updater=None, **kwargs) — accepts an optional EP update policy.
  • Declarative lowering passes an explicitly supplied updater unchanged to EPOptimiser.

Changed Behaviour

  • Explicit updater=... values now control declarative EP message updates.
  • Omitted updater continues to use SimplerUpdater(delta=1.0); no damping is enabled by default.

Migration

  • Existing calls require no changes.
  • Opt in with factor_graph.optimise(optimiser, updater=af.SimplerUpdater(delta=0.5)).

Generated by the PyAutoLabs agent workflow.

Copy link
Copy Markdown
Collaborator Author

Workspace PR: PyAutoLabs/autofit_workspace#136

This draft remains behind the library-first merge gate and should merge only after this PyAutoFit PR.

@Jammy2211
Jammy2211 marked this pull request as ready for review August 8, 2026 17:59
@Jammy2211
Jammy2211 merged commit 3b96060 into main Aug 8, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/ep-optimise-updater branch August 25, 2026 18:13
@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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: expose opt-in EP updater through declarative optimise

1 participant