Repository navigation
[tests] Compare eager and compiled seg maps in the detection compile test - #2169
Merged
felixdittrich92 merged 1 commit intoOct 16, 2026
Conversation
test_torch_compiled_models unpacked the compiled predictor's maps into seg_maps, which overwrote the eager maps, so the seg map assertion zipped seg_maps with itself and could never fail. Keep the compiled maps in their own variable and compare them against the eager ones at the existing atol=1e-4.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2169 +/- ##
=========================================
+ Coverage 0 97.62% +97.62%
=========================================
Files 0 170 +170
Lines 0 10740 +10740
=========================================
+ Hits 0 10485 +10485
- Misses 0 255 +255
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
felixdittrich92
approved these changes
Oct 16, 2026
felixdittrich92
left a comment
Collaborator
There was a problem hiding this comment.
Thanks @quotentiroler 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
test_torch_compiled_models in tests/pytorch/test_models_detection_pt.py unpacks the compiled predictor's output into
compiled_out, seg_maps. That overwrites the eager seg maps, so the following assertion zipsseg_mapswith itself and always passes.This keeps the compiled maps in
compiled_seg_mapsand compares them against the eager maps with the existingatol=1e-4. The tolerance is unchanged.Ran locally (Linux, Python 3.11, torch 2.14.1+cpu): all 9 parametrized architectures pass, so eager and compiled maps do match today. The test can now catch a regression there.
Prepared with Claude Code; I reviewed and tested the change.