Skip to content

fix(registration): initialize diagnostics vars when optimize_poses=False - #10

Merged
EndingCredits merged 1 commit into
mainfrom
hotfix/get-cleaned-poses-unbound-var
Aug 12, 2026
Merged

EndingCredits merged 1 commit into
mainfrom
hotfix/get-cleaned-poses-unbound-var

Conversation

@EndingCredits

Copy link
Copy Markdown
Collaborator

Fixes UnboundLocalError in get_cleaned_poses when return_diagnostics=True and optimize_poses=False (the default).

Problem

outlier_edges, untestable_edges, and final_edge_errors were only defined inside the if optimize_poses: branch, but referenced unconditionally in the diagnostics dict.

Fix

Initialize sensible defaults in the else branch:

  • outlier_edges = set() — no outlier removal performed
  • untestable_edges — computed from edge_scores
  • final_edge_errors = {} — no post-optimization residuals

@EndingCredits
EndingCredits merged commit 69b1c42 into main Aug 12, 2026
4 of 10 checks passed
@EndingCredits
EndingCredits deleted the hotfix/get-cleaned-poses-unbound-var branch August 12, 2026 10:16
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.

1 participant