Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbarghi-nv committed Jul 21, 2022
1 parent 4b01c26 commit fd3b844
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from pylibcugraph import \
uniform_neighbor_sample as pylibcugraph_uniform_neighbor_sample

from cugraph.dask.common.input_utils import get_distributed_data
from cugraph.dask.comms import comms as Comms


Expand Down
30 changes: 16 additions & 14 deletions python/cugraph/cugraph/structure/graph_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def from_cudf_edgelist(
renumber : bool, optional (default=True)
Indicate whether or not to renumber the source and destination
vertex IDs.
store_transposed : bool, optional (default=False)
If True, stores the transpose of the adjacency matrix. Required
for certain algorithms.
legacy_renum_only : bool, optional (default=False)
If True, skips the C++ renumbering step. Must be true for
pylibcugraph algorithms. Must be false for algorithms
Expand Down Expand Up @@ -263,11 +263,11 @@ def from_dask_cudf_edgelist(
renumber : bool, optional (default=True)
If source and destination indices are not in range 0 to V where V
is number of vertices, renumber argument should be True.
store_transposed : bool, optional (default=False)
If True, stores the transpose of the adjacency matrix. Required
for certain algorithms.
legacy_renum_only : bool, optional (default=False)
If True, skips the C++ renumbering step. Must be true for
pylibcugraph algorithms. Must be false for algorithms
Expand All @@ -281,13 +281,15 @@ def from_dask_cudf_edgelist(
raise RuntimeError("Graph is already initialized")
elif (self._Impl.edgelist is not None):
raise RuntimeError("Graph already has values")
self._Impl._simpleDistributedGraphImpl__from_edgelist(input_ddf,
source,
destination,
edge_attr,
renumber,
store_transposed,
legacy_renum_only)
self._Impl._simpleDistributedGraphImpl__from_edgelist(
input_ddf,
source,
destination,
edge_attr,
renumber,
store_transposed,
legacy_renum_only
)

# Move to Compat Module
def from_pandas_edgelist(
Expand Down Expand Up @@ -748,11 +750,11 @@ def from_cudf_edgelist(
renumber : bool, optional (default=True)
Indicate whether or not to renumber the source and destination
vertex IDs
store_transposed : bool, optional (default=False)
If True, stores the transpose of the adjacency matrix. Required
for certain algorithms.
legacy_renum_only : bool, optional (default=False)
If True, skips the C++ renumbering step. Must be true for
pylibcugraph algorithms. Must be false for algorithms
Expand Down Expand Up @@ -823,7 +825,7 @@ def from_dask_cudf_edgelist(
store_transposed : bool, optional (default=False)
If True, stores the transpose of the adjacency matrix. Required
for certain algorithms.
legacy_renum_only : bool, optional (default=False)
If True, skips the C++ renumbering step. Must be true for
pylibcugraph algorithms. Must be false for algorithms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ def compute_renumber_edge_list(self,
This parameter is added for new algos following the
C/Pylibcugraph path
"""

if not self.properties.renumber:
self.edgelist = self.EdgeList(self.input_df)
self.renumber_map = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,10 @@ def __from_edgelist(
if self.batch_enabled:
self._replicate_edgelist()


self._make_plc_graph(value_col=value_col, store_transposed=store_transposed)
self._make_plc_graph(
value_col=value_col,
store_transposed=store_transposed
)

def to_pandas_edgelist(self, source='src', destination='dst',
weight='weights'):
Expand Down Expand Up @@ -830,7 +832,7 @@ def to_undirected(self, G, store_transposed=False):
value_col = None
G.edgelist = simpleGraphImpl.EdgeList(source_col, dest_col,
value_col)

if 'weights' in self.edgelist.edgelist_df:
value_col = self.edgelist.edgelist_df['weights']
else:
Expand Down

0 comments on commit fd3b844

Please sign in to comment.