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

Heuristic Sampling Improvements #287

Merged
merged 9 commits into from
Jul 18, 2024
Merged

Conversation

Eric-Vin
Copy link
Collaborator

@Eric-Vin Eric-Vin commented Jul 7, 2024

Description

Improves heuristic sampling functionality in the veneer. Now everything should raise RejectionException, which is converted to an InvalidScenarioError at a higher level if appropriate.

Issue Link

#256

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

Copy link
Contributor

@abanuelo abanuelo left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
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.

I think the sense of the main test is backwards (rejections should ordinarily not be allowed at compile time), so we'd better add a test making sure it works correctly. I have a refactoring suggestion above too.

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.27%. Comparing base (d7679fb) to head (2759488).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
- Coverage   91.32%   91.27%   -0.06%     
==========================================
  Files          54       54              
  Lines       13515    13528      +13     
==========================================
+ Hits        12343    12348       +5     
- Misses       1172     1180       +8     
Files Coverage Δ
src/scenic/domains/driving/roads.py 94.18% <100.00%> (+0.09%) ⬆️

... and 8 files with indirect coverage changes

@Eric-Vin Eric-Vin requested a review from dfremont July 11, 2024 11:32
Copy link
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.

Looks good! If you want to fix the issue of having to set a fixed color in the test by changing DrivingObject.lane etc. to use self.position instead of self in this PR, go ahead; otherwise we can make a new one.

@Eric-Vin
Copy link
Collaborator Author

Went ahead and made the change. Please go ahead and take a final look and merge when you get the chance!

@Eric-Vin Eric-Vin requested a review from dfremont July 12, 2024 17:24
@Eric-Vin Eric-Vin merged commit 488f45a into main Jul 18, 2024
26 checks passed
@Eric-Vin Eric-Vin deleted the AlwaysProvidesOrientationFix branch July 18, 2024 00:14
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.

oppositeLaneGroup is broken for scenic.domains.driving.model
3 participants