-
Notifications
You must be signed in to change notification settings - Fork 81
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
Add a simple sampler-tests generating decorator #627
Conversation
f934aee
to
6d1285b
Compare
Codecov Report
@@ Coverage Diff @@
## master #627 +/- ##
==========================================
- Coverage 90.81% 90.69% -0.12%
==========================================
Files 57 58 +1
Lines 3918 4018 +100
==========================================
+ Hits 3558 3644 +86
- Misses 360 374 +14
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great stuff, this will catch many bugs!
Some possible future improvements:
- Allow solver developers to pass in "extra" BQMs to be tested. Maybe for each BQM, convert to each BQM class and vartype.
- We could consider a optional tests that try to ensure the samples returned actually line up with the variable labelling, e.g. pass in a problem with just large hs and check to make sure the samples line up. Obviously this is tricky with heuristics.
This covers the labelling and the large problems can be filtered using the |
I mean "correct" answers. If I submit h={0: -100, 1: 100}, and get magnetizations of {0: -0.98, 1: 0.99}, the labeling is probably reversed. |
I also fixed some bugs that this testing framework uncovered. There are two bugs remaining to fix but they are significant enough to be beyond the scope of this PR.