Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restore DERelative tests, drop zero init #1777

Merged
merged 1 commit into from
Sep 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions test/testDERelative.jl
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,9 @@ pts_ = approxConv(fg, :x0x1f1, :x0)
##

tfg = initfg()
for s in ls(fg)
initVariable!(fg, s, [0.1.*zeros(2) for _ in 1:100])
end
# for s in ls(fg)
# initVariable!(fg, s, [0.1.*zeros(2) for _ in 1:100])
# end

pts = approxConv(fg, :x0f1, :x7, setPPE=true, tfg=tfg)
initVariable!(tfg, :x7, pts)
Expand All @@ -413,16 +413,23 @@ initVariable!(tfg, :x7, pts)
@error "Disabling useMsgLikelihood for DERelative test, follow fix on #1010 as rough guide"
getSolverParams(fg).useMsgLikelihoods = false

solveTree!(fg);
smtasks = Task[]
tree = solveTree!(fg; recordcliqs=ls(fg), smtasks);

hists = fetchCliqHistoryAll!(smtasks)
printCSMHistoryLogical(hists)

_, csmc = repeatCSMStep!(hists[2], 6; duplicate=true);


##

# solveTree has weird problem in breaking correct init and inserting zeros???
@test_broken isapprox( getPPESuggested(fg, :x0), x0_val_ref; atol=0.2)
@test_broken isapprox( getPPESuggested(fg, :x1), x1_val_ref; atol=0.2)
@test_broken isapprox( getPPESuggested(fg, :x2), x2_val_ref; atol=0.2)
@test_broken isapprox( getPPESuggested(fg, :x3), x3_val_ref; atol=0.2)
@test_broken isapprox( getPPESuggested(fg, :x4), x4_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x0), x0_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x1), x1_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x2), x2_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x3), x3_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x4), x4_val_ref; atol=0.2)

@test isapprox( getPPESuggested(fg, :x5), x5_val_ref; atol=0.2)
@test isapprox( getPPESuggested(fg, :x6), x6_val_ref; atol=0.2)
Expand Down