Skip to content

Commit

Permalink
Merge 6223994 into f0c1e99
Browse files Browse the repository at this point in the history
  • Loading branch information
rlratzel authored Sep 26, 2022
2 parents f0c1e99 + 6223994 commit 694ae06
Showing 1 changed file with 1 addition and 34 deletions.
35 changes: 1 addition & 34 deletions python/pylibcugraph/pylibcugraph/tests/test_node2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
GraphProperties,
SGGraph,
node2vec)
from cugraph.testing import utils
import cugraph
from pylibcugraph.testing import utils


COMPRESSED = [False, True]
Expand Down Expand Up @@ -314,38 +313,6 @@ def test_node2vec(sg_graph_objs, compress_result):
path_start += actual_path_sizes[i]


@pytest.mark.parametrize(*_get_param_args("graph_file", [LINE]))
@pytest.mark.parametrize(*_get_param_args("renumber", COMPRESSED))
def test_node2vec_renumber_cudf(graph_file, renumber):
from cudf import read_csv, Series

cu_M = read_csv(graph_file, delimiter=' ',
dtype=['int32', 'int32', 'float32'], header=None)
G = cugraph.Graph(directed=True)
G.from_cudf_edgelist(cu_M, source="0", destination="1", edge_attr="2",
renumber=renumber)
src_arr = G.edgelist.edgelist_df['src']
dst_arr = G.edgelist.edgelist_df['dst']
wgt_arr = G.edgelist.edgelist_df['weights']
seeds = Series([8, 0, 7, 1, 6, 2], dtype="int32")
max_depth = 4
num_seeds = 6

resource_handle = ResourceHandle()
graph_props = GraphProperties(is_symmetric=False, is_multigraph=False)
G = SGGraph(resource_handle, graph_props, src_arr, dst_arr, wgt_arr,
store_transposed=False, renumber=renumber,
do_expensive_check=True)

(paths, weights, sizes) = node2vec(resource_handle, G, seeds, max_depth,
False, 0.8, 0.5)

for i in range(num_seeds):
if paths[i * max_depth] != seeds[i]:
raise ValueError("vertex_path {} start did not match seed \
vertex".format(paths))


@pytest.mark.parametrize(*_get_param_args("graph_file", [LINE]))
@pytest.mark.parametrize(*_get_param_args("renumber", COMPRESSED))
def test_node2vec_renumber_cupy(graph_file, renumber):
Expand Down

0 comments on commit 694ae06

Please sign in to comment.