Skip to content

Obscure error building tree if fg solvable not set right everywhere #1210

Open
@dehann

Description

@dehann

Tree elimination is bad, and therefore get incomplete cliques. This issue was caused by inconsistent solvable flags between variables and factors. In this case fg had 8 variables with 9 factors. All factors were solvable=1 but 3 variables were solvable=0.

The nonsense issue encountered in this case was

ERROR: mcmcIterationIDs -- unaccounted variables
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:33
  [2] mcmcIterationIDs(cliq::IncrementalInference.TreeClique)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:1366
  [3] mcmcIterationIdsOrdered(cliq::IncrementalInference.TreeClique)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:1395
  [4] setCliqMCIDs!(cliq::IncrementalInference.TreeClique)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:1460
  [5] buildCliquePotentials(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, bt::MetaBayesTree, cliq::IncrementalInference.TreeClique; solvable::Int64)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:1480
  [6] buildTreeFromOrdering!(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}, p::Vector{Symbol}; drawbayesnet::Bool, solvable::Int64)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:737
  [7] prepBatchTreeOLD!(dfg::LightDFG{SolverParams, DFGVariable, DFGFactor}; eliminationOrder::Nothing, variableOrder::Nothing, eliminationConstraints::Vector{Symbol}, variableConstraints::Nothing, ordering::Symbol, drawpdf::Bool, show::Bool, filepath::String, viewerapp::String, imgs::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:793
  [8] #buildTreeReset!#132
    @ ~/.julia/dev/IncrementalInference/src/JunctionTree.jl:880 [inlined]
  [9] solveTree!(dfgl::LightDFG{SolverParams, DFGVariable, DFGFactor}, oldtree::MetaBayesTree; timeout::Nothing, storeOld::Bool, verbose::Bool, verbosefid::Base.TTY, delaycliqs::Vector{Symbol}, recordcliqs::Vector{Symbol}, limititercliqs::Vector{Pair{Symbol, Int64}}, injectDelayBefore::Nothing, skipcliqids::Vector{Symbol}, eliminationOrder::Nothing, variableOrder::Nothing, eliminationConstraints::Vector{Symbol}, variableConstraints::Nothing, smtasks::Vector{Task}, dotreedraw::Vector{Int64}, runtaskmonitor::Bool, algorithm::Symbol, multithread::Bool)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolverAPI.jl:339
 [10] solveTree!(dfgl::LightDFG{SolverParams, DFGVariable, DFGFactor}, oldtree::MetaBayesTree) (repeats 2 times)
    @ IncrementalInference ~/.julia/dev/IncrementalInference/src/SolverAPI.jl:280
 [11] top-level scope
    @ REPL[13]:1

At first glance it looks hard to just define a simple test that works in all cases. We definitely need the case of solvable=0 to work, so just looking at the variable list is not good enough.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions