dwavesystems / dwavesystems/minorminer
9 tests fail in 0.2.11
- Dominant language
- Python
- Stars
- 54
- Forks
- 48
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 1
Description
**Description**
```
=============================================================================================== FAILURES ================================================================================================
_______________________________________________________________________________________ TestFindEmb.test_default ________________________________________________________________________________________
self =
def test_default(self):
"""
Minimal find_embedding call
"""
# Test a dnx_graph
> mml.find_embedding(self.S, self.C)
layout/test_find_embedding.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
____________________________________________________________________________________ TestFindEmb.test_layout_kwargs _____________________________________________________________________________________
self =
def test_layout_kwargs(self):
"""
Pass in layout kwargs.
"""
# Pick some values to pass in
dim = 3
center = (0, 0, 0)
scale = 2
> _, (S_layout, C_layout) = mml.find_embedding(self.S, self.C,
dim=dim, center=center, scale=scale, return_layouts=True)
layout/test_find_embedding.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None)
layout_kwargs = {'center': (0, 0, 0), 'dim': 3, 'scale': 2}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
___________________________________________________________________________________ TestFindEmb.test_layout_parameter ___________________________________________________________________________________
self =
def test_layout_parameter(self):
"""
It can be a function or a 2-tuple of various things.
"""
# A function
> mml.find_embedding(self.S, self.C, layout=nx.circular_layout)
layout/test_find_embedding.py:119:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = , layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
___________________________________________________________________________________ TestFindEmb.test_layout_returning ___________________________________________________________________________________
self =
def test_layout_returning(self):
"""
Layouts can be returned.
"""
> _, (S_layout, C_layout) = mml.find_embedding(
self.S, self.C, return_layouts=True)
layout/test_find_embedding.py:63:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
_______________________________________________________________________________________ TestFindEmb.test_mm_hints _______________________________________________________________________________________
self =
def test_mm_hints(self):
"""
Different types of mm.find_embedding hinting.
"""
> mml.find_embedding(self.S, self.C, mm_hint_type="initial_chains")
layout/test_find_embedding.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
__________________________________________________________________________________ TestFindEmb.test_placement_closest ___________________________________________________________________________________
self =
def test_placement_closest(self):
"""
Test the closest placement strategy
"""
# Pick some values to pass in
subset_size = (1, 2)
num_neighbors = 5
> mml.find_embedding(self.S, self.C, placement=mml.closest,
subset_size=subset_size, num_neighbors=num_neighbors)
layout/test_find_embedding.py:105:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
________________________________________________________________________________ TestFindEmb.test_placement_interesction ________________________________________________________________________________
self =
def test_placement_interesction(self):
"""
Test the intersection placement strategy
"""
> mml.find_embedding(self.S, self.C, placement=mml.intersection)
layout/test_find_embedding.py:112:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
___________________________________________________________________________________ TestFindEmb.test_placement_kwargs ___________________________________________________________________________________
self =
def test_placement_kwargs(self):
"""
Pass in placement kwargs.
"""
# Pick some values to pass in
scale_ratio = .8
> mml.find_embedding(self.S, self.C, scale_ratio=scale_ratio)
layout/test_find_embedding.py:95:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
_______________________________________________________________________________________ TestFindEmb.test_timeout ________________________________________________________________________________________
self =
def test_timeout(self):
"""
Test the timeout parameter
"""
# Subtract time from layout and placement and give it to mm.find_embedding
> mml.find_embedding(self.S, self.C, timeout=10)
layout/test_find_embedding.py:43:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:93: in find_embedding
S_layout, T_layout = _parse_layout_parameter(S, T, layout, layout_kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
S = , T = , layout = (, None), layout_kwargs = {}
def _parse_layout_parameter(S, T, layout, layout_kwargs):
"""Determine what combination of iterable, dict, and function the layout
parameter is.
"""
> if nx.utils.iterable(layout):
E AttributeError: module 'networkx.utils' has no attribute 'iterable'
../../stage/usr/local/lib/python3.9/site-packages/minorminer/layout/__init__.py:154: AttributeError
=========================================================================================== warnings summary ============================================================================================
../../stage/usr/local/lib/python3.9/site-packages/minorminer/utils/polynomialembedder.py:60
/usr/ports/math/py-minorminer/work-py39/stage/usr/local/lib/python3.9/site-packages/minorminer/utils/polynomialembedder.py:60: DeprecationWarning: minorminer.utils.polynomialembedder is deprecated. Use minorminer.busclique intead.
warnings.warn("minorminer.utils.polynomialembedder is deprecated. Use minorminer.busclique intead.", DeprecationWarning)
tests/layout/test_layout.py::TestLayout::test_pnorm
/usr/local/lib/python3.9/site-packages/numpy/linalg/linalg.py:2551: RuntimeWarning: invalid value encountered in reciprocal
ret **= reciprocal(ord, dtype=ret.dtype)
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
========================================================================= 9 failed, 153 passed, 2 warnings in 427.28s (0:07:07) =========================================================================
*** Error code 1
```
**To Reproduce**
Regular build/test.
**Environment:**
- OS: FreeBSD 13.1
- Python version: 3.9
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.