-
Notifications
You must be signed in to change notification settings - Fork 64
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
Deprecate VirtualGraphComposite
#532
Deprecate VirtualGraphComposite
#532
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #532 +/- ##
==========================================
- Coverage 89.65% 86.71% -2.94%
==========================================
Files 24 24
Lines 1760 1762 +2
==========================================
- Hits 1578 1528 -50
- Misses 182 234 +52 ☔ View full report in Codecov by Sentry. |
"of newer QPUs and in future will raise an exception; if needed, " | ||
"follow the instructions in the shimming tutorial at " | ||
"https://github.com/dwavesystems/shimming-tutorial instead. ", | ||
DeprecationWarning |
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.
I think we might need to set the stacklevel
for the warning to be shown from the correct code line?
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.
I saw that we are inconsistent. LeapHybridDQMSampler sets the stacklevel
but LazyEmbeddingComposite does not. I think we need that to override Python's newer default that doesn't show warnings unless users set them to show. Do we want to do that?
@@ -32,14 +37,19 @@ | |||
from dwave.system.composites.embedding import FixedEmbeddingComposite | |||
from dwave.system.flux_bias_offsets import get_flux_biases | |||
|
|||
from warnings import warn |
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.
Python libraries get imported first.
Also, IMO it's nicer to just import warnings
then do warnings.warn
for a slightly cleaner namespace.
Deprecated. | ||
Virtual graphs are deprecated due to improved calibration of newer QPUs; to | ||
calibrate chains for residual biases, follow the instructions in the | ||
`shimming tutorial <https://github.com/dwavesystems/shimming-tutorial>`_. | ||
|
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.
Consider using .. deprecated:: version
Sphinx directive.
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.
I did that now for the class (line 50 below).
We should update the tests with assertWarns for the deprecation warning. I know we already have a few warnings when we run the tests, but I'd like to not make it worse. |
Closes #531 and #54