Skip to content

Improve State.belief semantics and add explicit topology; mark getSolverParams as deprecated#1227

Merged
Affie merged 3 commits intodevelopfrom
maint/state_solverparams
Apr 28, 2026
Merged

Improve State.belief semantics and add explicit topology; mark getSolverParams as deprecated#1227
Affie merged 3 commits intodevelopfrom
maint/state_solverparams

Conversation

@Affie
Copy link
Copy Markdown
Member

@Affie Affie commented Apr 24, 2026

@Affie Affie requested a review from Copilot April 24, 2026 18:55
@Affie Affie self-assigned this Apr 24, 2026
@Affie Affie added this to the v0.29.0 milestone Apr 24, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR clarifies belief/state semantics by renaming the serialized belief container and introducing an explicit “topology” trait for homotopy beliefs, while also deprecating getSolverParams as part of the longer-term plan to remove SolverParams from the DFG object.

Changes:

  • Rename StoredBeliefStoredHomotopyBelief and add AbstractHomotopyTopology (Roots/Leaves/Tree topologies + explicit parent arrays).
  • Rename/reshape belief fields (covariancesshapes, bandwidthbandwidths::Vector) and update serialization, printing, equality/compare, and tests accordingly.
  • Deprecate getSolverParams(dfg) with a runtime depwarn; adjust a couple of module exports.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
test/testSerializingVariables.jl Updates JSON round-trip tests to new belief type/topology and shapes field.
src/services/print.jl Switches printed KDE bandwidth output to the new bandwidths representation.
src/services/compare.jl Updates State comparison to use refBandwidths.
src/services/AbstractDFG.jl Implements deprecation warning for getSolverParams.
src/entities/equality.jl Updates generated compare union to the renamed belief type.
src/entities/State.jl Introduces topology trait/types; renames and extends stored belief schema; updates state accessors.
src/Serialization/StateSerialization.jl Migrates old-state unpacking to construct StoredHomotopyBelief.
src/DistributedFactorGraphs.jl Changes @format_str / @defStateType visibility to exported.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/entities/State.jl
Comment thread src/entities/State.jl
Comment thread src/services/print.jl
Comment thread src/services/AbstractDFG.jl
Comment thread src/DistributedFactorGraphs.jl
Comment thread src/entities/State.jl
@Affie
Copy link
Copy Markdown
Member Author

Affie commented Apr 28, 2026

This has cross dependency with IIF, so one can't pass without the other. Tested locally so will merge.

@Affie Affie merged commit e7252bf into develop Apr 28, 2026
2 of 4 checks passed
Comment thread src/entities/State.jl
"""
[Order 2] The spread/curvature of each node (e.g., Covariance or Precision matrix).
"""
shapes::Vector{Matrix{Float64}} = Matrix{Float64}[] # previously `covar` existed but was stored in `bw` (hacky)
Copy link
Copy Markdown
Member Author

@Affie Affie Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants