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

Fix cross-entropy tests and leakage issue #259

Merged
merged 1 commit into from
May 9, 2024
Merged

Fix cross-entropy tests and leakage issue #259

merged 1 commit into from
May 9, 2024

Conversation

dfremont
Copy link
Collaborator

@dfremont dfremont commented May 8, 2024

Description

The tests for the interface with VerifAI's cross-entropy sampler keep failing occasionally since I chose the parameters poorly. This PR improves the tests in various ways and should ensure the false positive rate is extremely low. In the process I noticed an issue whereby the distribution of one sampling run would leak into the next (even after calling resetExternalSampler), so I've fixed that and added an assertion catching it.

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

@dfremont dfremont requested a review from Eric-Vin May 8, 2024 18:40
Copy link

codecov bot commented May 8, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 86.12%. Comparing base (9ba90a3) to head (2a2569f).

Files Patch % Lines
tests/syntax/test_verifai_samplers.py 96.07% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #259      +/-   ##
==========================================
- Coverage   86.16%   86.12%   -0.05%     
==========================================
  Files         144      144              
  Lines       25012    25039      +27     
==========================================
+ Hits        21552    21564      +12     
- Misses       3460     3475      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@Eric-Vin Eric-Vin left a comment

Choose a reason for hiding this comment

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

A little over my head but nothing jumped out as wrong!

@dfremont dfremont merged commit 308c351 into main May 9, 2024
25 of 26 checks passed
@dfremont dfremont deleted the fix_ce branch May 9, 2024 16:35
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