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

Support all structured samplers in SubproblemCliqueEmbedder #271

Merged
merged 6 commits into from
Jun 1, 2022
Merged

Support all structured samplers in SubproblemCliqueEmbedder #271

merged 6 commits into from
Jun 1, 2022

Conversation

seatim
Copy link

@seatim seatim commented May 31, 2022

Fixes #264

To be clear, all structured samplers with topologies that are supported by minorminer.busclique are supported in SubproblemCliqueEmbedder with this change.

Both chimera- and pegasus-structured (mock) samplers are explicitly tested in composition with SubproblemCliqueEmbedder in unit tests with this change. Support for zephyr-structured samplers has been confirmed with manual testing. Not adding a unit test for Zephyr at this time - we will have to change requirements.txt to depend on a newer [1] dwave-system for that.

[1] Not sure what is the exact minimum version that we would need for this, but it is no less than 1.13.0 as we need dwavesystems/dwave-system@79fcf55

Edit: Added a unit test for Zephyr also.

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2022

Codecov Report

Merging #271 (70056dc) into master (b9025b5) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #271      +/-   ##
==========================================
+ Coverage   92.46%   92.53%   +0.06%     
==========================================
  Files          17       17              
  Lines        2071     2063       -8     
==========================================
- Hits         1915     1909       -6     
+ Misses        156      154       -2     
Impacted Files Coverage Δ
hybrid/samplers.py 92.27% <100.00%> (+0.64%) ⬆️

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 b9025b5...70056dc. Read the comment docs.

@@ -109,12 +112,12 @@ def test_external_embedding_sampler(self):
# verify mock sampler received custom kwargs
self.assertEqual(res.subsamples.first.energy, -1)

def test_clique_embedder(self):
@parameterized.expand([['chimera', 2], ['pegasus', 1]])
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a test for Zephyr as well?

Copy link
Member

Choose a reason for hiding this comment

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

Now I see your comment above. You can up the lower bound in tests/requirements.txt only.

@@ -1,3 +1,4 @@
coverage
codecov
parameterized
dwave-system>=1.13.0
Copy link
Member

Choose a reason for hiding this comment

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

I see this creates a conflict with main requirements file. We'll have to update it there instead.

Copy link
Author

@seatim seatim May 31, 2022

Choose a reason for hiding this comment

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

When I tested locally, I ran pip install -r requirements.txt and pip install -r test/requirements.txt sequentially. And that worked. I see that CircleCI (.circleci/config.yml) is doing pip install -r requirements.txt -r test/requirements.txt in one command. So, alternatively, I suppose we could change .circleci/config.yml to run those commands sequentially. Should I try that?

Copy link
Member

Choose a reason for hiding this comment

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

Sure, that should work!

Copy link
Author

Choose a reason for hiding this comment

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

✔️

Copy link
Member

@randomir randomir left a comment

Choose a reason for hiding this comment

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

LGTM

@randomir randomir merged commit 39f0e50 into dwavesystems:master Jun 1, 2022
@seatim seatim deleted the fix-clique-embedding branch June 1, 2022 22:35
randomir added a commit to randomir/dwave-hybrid that referenced this pull request Jun 29, 2022
Fixes
---
- Support all structured samplers in SubproblemCliqueEmbedder (dwavesystems#271)
randomir added a commit to randomir/dwave-hybrid that referenced this pull request Jul 29, 2022
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.

Clique Embedding not working
3 participants