Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes unneeded test dependency on cugraph from pylibcugraph tests #2738

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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