dwavesystems / dwave-system

An API for easily incorporating the D-Wave system as a sampler, either directly or through Leap's cloud-based hybrid samplers
https://docs.ocean.dwavesys.com/
Apache License 2.0
87 stars 63 forks source link

Add options for DQM subclasses to specialize behavior of LeapHybridDQMSampler.sample_dqm() #409

Closed seatim closed 3 years ago

seatim commented 3 years ago

For https://github.com/dwavesystems/dimod/issues/840

codecov-commenter commented 3 years ago

Codecov Report

Merging #409 (228ec89) into master (ecbb026) will decrease coverage by 0.51%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #409      +/-   ##
==========================================
- Coverage   91.93%   91.41%   -0.52%     
==========================================
  Files          22       22              
  Lines        1314     1317       +3     
==========================================
- Hits         1208     1204       -4     
- Misses        106      113       +7     
Impacted Files Coverage Δ
dwave/system/samplers/leap_hybrid_sampler.py 74.60% <100.00%> (+0.61%) :arrow_up:
dwave/system/samplers/dwave_sampler.py 84.37% <0.00%> (-3.13%) :arrow_down:
dwave/system/composites/embedding.py 95.85% <0.00%> (-1.19%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update ecbb026...228ec89. Read the comment docs.

seatim commented 3 years ago

Note, 6196c74 is no longer needed for dwavesystems/dimod#840 and can be reverted.

seatim commented 3 years ago

I think we should add a note to the documentation explaining that in the case that a user is submitting a CaseLabelDQM, they'll need to use CaseLabelDQM.map_sample to restore the case labels.

👍 Sure. I'm thinking the doc string for LeapHybridDQM.sample_dqm(), specifically the "Returns:" section, would be the right place for that note. Is that what you're thinking?

arcondello commented 3 years ago

specifically the "Returns:" section

Either that or in the args under dqm. Either way, or both :shrug: