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

Deprecate VirtualGraphComposite #532

Merged

Conversation

JoelPasvolsky
Copy link
Contributor

Closes #531 and #54

Copy link

codecov bot commented Aug 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.71%. Comparing base (b233941) to head (c4da9e1).
Report is 9 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

"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
Copy link
Member

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?

Copy link
Contributor Author

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

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.

Comment on lines +16 to +20
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>`_.

Copy link
Member

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.

Copy link
Contributor Author

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).

@arcondello
Copy link
Member

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.

@arcondello arcondello merged commit 3ededa3 into dwavesystems:master Aug 21, 2024
16 checks passed
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.

VirtualGraphComposite underperforming on current QPUs
3 participants