Skip to content

Commit

Permalink
pass keyword argument to accommodate for the plc graph creation signa…
Browse files Browse the repository at this point in the history
…ture change
  • Loading branch information
jnke2016 committed Nov 20, 2023
1 parent 4513d19 commit cc113db
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 75 deletions.
10 changes: 5 additions & 5 deletions python/pylibcugraph/pylibcugraph/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,11 @@ def create_SGGraph(device_srcs, device_dsts, device_weights, transposed=False):
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)

g = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=transposed,
renumber=False,
do_expensive_check=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def _generic_eigenvector_test(
resource_handle = ResourceHandle()
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)
G = SGGraph(
resource_handle,
graph_props,
src_arr,
dst_arr,
wgt_arr,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=src_arr,
dst_or_index_array=dst_arr,
weight_array=wgt_arr,
store_transposed=False,
renumber=False,
do_expensive_check=True,
Expand Down
25 changes: 10 additions & 15 deletions python/pylibcugraph/pylibcugraph/tests/test_graph_sg.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def test_sg_graph(graph_data):

if is_valid:
g = SGGraph( # noqa:F841
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=False,
do_expensive_check=False,
Expand All @@ -100,11 +100,11 @@ def test_sg_graph(graph_data):
else:
with pytest.raises(ValueError):
SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=False,
do_expensive_check=False,
Expand All @@ -130,7 +130,6 @@ def test_SGGraph_create_from_cudf():
SGGraph,
)

print("get edgelist...", end="", flush=True)
edgelist = cudf.DataFrame(
{
"src": [0, 1, 2],
Expand All @@ -139,10 +138,6 @@ def test_SGGraph_create_from_cudf():
}
)

print("edgelist = ", edgelist)
print("done", flush=True)
print("create Graph...", end="", flush=True)

graph_props = GraphProperties(is_multigraph=False, is_symmetric=False)

plc_graph = SGGraph(
Expand Down
10 changes: 5 additions & 5 deletions python/pylibcugraph/pylibcugraph/tests/test_katz_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def _generic_katz_test(
resource_handle = ResourceHandle()
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)
G = SGGraph(
resource_handle,
graph_props,
src_arr,
dst_arr,
wgt_arr,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=src_arr,
dst_or_index_array=dst_arr,
weight_array=wgt_arr,
store_transposed=False,
renumber=False,
do_expensive_check=True,
Expand Down
20 changes: 10 additions & 10 deletions python/pylibcugraph/pylibcugraph/tests/test_louvain.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def test_sg_louvain_cupy():
resolution = 1.0

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=True,
do_expensive_check=False,
Expand Down Expand Up @@ -135,11 +135,11 @@ def test_sg_louvain_cudf():
resolution = 1.0

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=True,
do_expensive_check=False,
Expand Down
20 changes: 10 additions & 10 deletions python/pylibcugraph/pylibcugraph/tests/test_node2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ def _run_node2vec(
resource_handle = ResourceHandle()
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)
G = SGGraph(
resource_handle,
graph_props,
src_arr,
dst_arr,
wgt_arr,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=src_arr,
dst_or_index_array=dst_arr,
weight_array=wgt_arr,
store_transposed=False,
renumber=renumbered,
do_expensive_check=True,
Expand Down Expand Up @@ -795,11 +795,11 @@ def test_node2vec_renumber_cupy(graph_file, renumber):
resource_handle = ResourceHandle()
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)
G = SGGraph(
resource_handle,
graph_props,
src_arr,
dst_arr,
wgt_arr,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=src_arr,
dst_or_index_array=dst_arr,
weight_array=wgt_arr,
store_transposed=False,
renumber=renumber,
do_expensive_check=True,
Expand Down
20 changes: 10 additions & 10 deletions python/pylibcugraph/pylibcugraph/tests/test_triangle_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ def test_sg_triangle_count_cupy():
start_list = None

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=True,
do_expensive_check=False,
Expand Down Expand Up @@ -131,11 +131,11 @@ def test_sg_triangle_count_cudf():
start_list = None

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=False,
renumber=True,
do_expensive_check=False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ def test_neighborhood_sampling_cupy(
num_edges = max(len(device_srcs), len(device_dsts))

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=store_transposed,
renumber=renumber,
do_expensive_check=False,
Expand Down Expand Up @@ -153,11 +153,11 @@ def test_neighborhood_sampling_cudf(
num_edges = max(len(device_srcs), len(device_dsts))

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=store_transposed,
renumber=renumber,
do_expensive_check=False,
Expand Down Expand Up @@ -203,11 +203,11 @@ def test_neighborhood_sampling_large_sg_graph(gpubenchmark):
fanout_vals = np.asarray([1, 2], dtype=np.int32)

sg = SGGraph(
resource_handle,
graph_props,
device_srcs,
device_dsts,
device_weights,
resource_handle=resource_handle,
graph_properties=graph_props,
src_or_offset_array=device_srcs,
dst_or_index_array=device_dsts,
weight_array=device_weights,
store_transposed=True,
renumber=False,
do_expensive_check=False,
Expand Down

0 comments on commit cc113db

Please sign in to comment.