You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maximum_spanning_tree shares the same signature as minimum_spanning_tree, and yet when a graph with only edgelist data is passed into maximum_spanning_tree, an AttributeError is raised because G.adjlist is required to be not None:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/cugraph-22.6.0a0+65.g2956d563.dirty-py3.8-linux-x86_64.egg/cugraph/tree/minimum_spanning_tree.py", line 155, in maximum_spanning_tree
return _maximum_spanning_tree_subgraph(G)
File "/opt/conda/envs/rapids/lib/python3.8/site-packages/cugraph-22.6.0a0+65.g2956d563.dirty-py3.8-linux-x86_64.egg/cugraph/tree/minimum_spanning_tree.py", line 41, in _maximum_spanning_tree_subgraph
if G.adjlist.weights is not None:
AttributeError: 'NoneType' object has no attribute 'weights'
>>> G.adjlist.weights
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'NoneType' object has no attribute 'weights'
…list (#2256)
This PR resolves#2251 , where minimum spanning tree and maximum spanning tree had different behaviors when using edge list data versus adjacency list data, specifically that a call to compute the adjacency list had to be made before running maximum spanning tree because of how weights were calculated. After adding a check to verify that the adjacency list was computed, examples for both mst algorithms were uncommented.
Authors:
- https://github.com/betochimas
Approvers:
- Rick Ratzel (https://github.com/rlratzel)
URL: #2256
maximum_spanning_tree
shares the same signature asminimum_spanning_tree
, and yet when a graph with only edgelist data is passed intomaximum_spanning_tree
, anAttributeError
is raised because G.adjlist is required to be not None:Steps/Code to reproduce bug
Expected behavior
Expected to assign G_mst a cuGraph.Graph object with mst data
Using Docker container
rapidsai/rapidsai-core-dev-nightly:22.04-cuda11.5-devel-ubuntu18.04-py3.8
The text was updated successfully, but these errors were encountered: