Skip to content

TEST: consolidate reconstruction regressions and cover numerical steps - #109

Merged
mdw771 merged 1 commit into
mainfrom
codex/reconstruction-test-coverage
Nov 16, 2026
Merged

mdw771 merged 1 commit into
mainfrom
codex/reconstruction-test-coverage

Conversation

@mdw771

@mdw771 mdw771 commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Features/fixes

Overlapping full reconstructions make the test suite expensive. Reduce 51 saved-reference cases to six comprehensive e2e cases covering LSQML, AD, BH, ePIE, DM, and rPIE, and retain the synthetic RAAR e2e case. Rename their files and test methods with the _e2e suffix and register an e2e marker for separate runs.

Replace redundant reconstructions with inline numerical and shared-feature tests covering reciprocal projection, LSQML accumulation and least-squares steps, AD gradients and scheduling, BH and PIE updates, position correction, constraints, low-memory forward models, data placement, and distributed reduction. Keep the shared make_task helper in tests/test_utils.py and restrict gold generation to retained saved-reference tests.

The six retained saved-reference reconstruction bodies match main by AST comparison; their reference keys and tolerances are preserved.

Validation

  • Full non-e2e suite after rebase: 1,707 passed.
  • Retained e2e suite: 6 passed, 1 failed. DM reproduces the pre-existing reference mismatch exactly: mean absolute difference 0.3399889469; maximum 1.7501988411. This was also reproduced with the unchanged original test.
  • After moving the helper into test_utils.py: 112 affected tests passed.
  • Whitespace and shell syntax checks pass. Ruff F checks found no new issues; test_utils.py retains four existing unused imports.

Commands: uv run --locked --with torch==2.12.1 --with torchvision pytest --high-tol -m 'not e2e' and the same command with -m e2e.

Mentions

No reviewers requested.

Checklist (Don't skip!)

  • Formatted code adhering to PEP-8. Existing formatting in retained reconstruction bodies is preserved.
  • Removed large commented-out blocks introduced by this change.
  • Documented new helpers with non-trivial signatures.
  • Resolved merge conflicts with main.
  • Reviewed the diff for regressions and unrelated changes; known DM failure is documented above.
  • Scoped the PR to reconstruction test consolidation and numerical coverage.
  • Added unit tests where needed.

Keep one comprehensive e2e case per reconstructor and replace overlapping reconstructions with inline numerical and shared-feature tests.

Validation: 1707 unit tests and six e2e tests pass. The retained DM e2e reproduces its pre-existing reference mismatch.
@mdw771
mdw771 merged commit d6a7680 into main Nov 16, 2026
2 checks passed
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