Skip to content

Add Fix for the Size-based containsRegion Heuristic#458

Merged
dfremont merged 1 commit intomainfrom
ContainsRegionHeuristicFix
Apr 25, 2026
Merged

Add Fix for the Size-based containsRegion Heuristic#458
dfremont merged 1 commit intomainfrom
ContainsRegionHeuristicFix

Conversation

@Eric-Vin
Copy link
Copy Markdown
Collaborator

Description

This fixes the size-based fast path used in containsRegion. It previously triggered when tolerance is non-zero (but ignored tolerance) and was susceptible to small numerical errors. This fix disables it for cases with non-zero tolerance and adds a small fudge-factor to ensure the heuristic is robust to small numerical errors.

Issue Link

N/A

Checklist

  • I have tested the changes locally via pytest and/or other means
  • I have added or updated relevant documentation
  • I have autoformatted the code with black and isort
  • I have added test cases (if applicable)

Additional Notes

N/A

@Eric-Vin Eric-Vin changed the title Add Fix for the ize-based containsRegion heuristic. Add Fix for the Size-based containsRegion heuristic. Apr 18, 2026
@Eric-Vin Eric-Vin changed the title Add Fix for the Size-based containsRegion heuristic. Add Fix for the Size-based containsRegion Heuristic Apr 18, 2026
@Eric-Vin Eric-Vin changed the title Add Fix for the Size-based containsRegion Heuristic Add Fix for the Size-based containsRegion Heuristic Apr 18, 2026
@Eric-Vin Eric-Vin requested a review from dfremont April 18, 2026 20:13
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.71%. Comparing base (d74f61c) to head (494a24d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #458      +/-   ##
==========================================
+ Coverage   89.64%   89.71%   +0.06%     
==========================================
  Files          48       48              
  Lines       13226    13226              
==========================================
+ Hits        11857    11866       +9     
+ Misses       1369     1360       -9     
Files with missing lines Coverage Δ
src/scenic/core/regions.py 87.94% <100.00%> (+0.35%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Collaborator

@dfremont dfremont left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Eric!

@dfremont dfremont merged commit ffa0aba into main Apr 25, 2026
35 checks passed
@dfremont dfremont deleted the ContainsRegionHeuristicFix branch April 25, 2026 02:24
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.

2 participants