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

[REVIEW] fix_tests #1008

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
- PR #983 Fix offset calculation in COO to CSR
- PR #989: Fix issue with incorrect docker image being used in local build script
- PR #992 Fix unrenumber of predecessor

- PR #1008 Fix for cudf updates disabling iteration of Series/Columns/Index

# cuGraph 0.14.0 (03 Jun 2020)

## New Features
Expand Down
4 changes: 2 additions & 2 deletions notebooks/structure/Renumber.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,10 @@
"jac = cugraph.jaccard(G)\n",
"\n",
"jac.add_column(\"original_source\",\n",
" [ socket.inet_ntoa(struct.pack('!L', numbering[x])) for x in jac['source'] ])\n",
" [ socket.inet_ntoa(struct.pack('!L', numbering[x])) for x in jac['source'].values_host ])\n",
"\n",
"jac.add_column(\"original_destination\",\n",
" [ socket.inet_ntoa(struct.pack('!L', numbering[x])) for x in jac['destination'] ])\n",
" [ socket.inet_ntoa(struct.pack('!L', numbering[x])) for x in jac['destination'].values_host ])\n",
"\n",
"jac.to_pandas()\n"
]
Expand Down
4 changes: 2 additions & 2 deletions python/cugraph/tests/test_bfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,9 @@ def _compare_bfs_spc(G, Gnx, source):
sorted_df = df.sort_values('vertex') \
.rename(columns={"sp_counter": "cu_spc"}, copy=False)

# This will allows to detect vertices identifier that could have been
# This allows to detect vertices identifier that could have been
# wrongly present multiple times
cu_vertices = set(sorted_df['vertex'])
cu_vertices = set(sorted_df['vertex'].values_host)
nx_vertices = nx_sp_counter.keys()
assert len(cu_vertices.intersection(nx_vertices)) == len(nx_vertices), \
"There are missing vertices"
Expand Down
5 changes: 2 additions & 3 deletions python/cugraph/tests/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def test_has_node(graph_file):
G = cugraph.Graph()
G.from_cudf_edgelist(cu_M, source='0', destination='1')

for n in nodes:
for n in nodes.values_host:
assert G.has_node(n)


Expand All @@ -668,8 +668,7 @@ def test_neighbors(graph_file):

Gnx = nx.from_pandas_edgelist(M, source='0', target='1',
create_using=nx.Graph())
for n in nodes:
print("NODE: ", n)
for n in nodes.values_host:
cu_neighbors = G.neighbors(n).tolist()
nx_neighbors = [i for i in Gnx.neighbors(n)]
cu_neighbors.sort()
Expand Down
11 changes: 7 additions & 4 deletions python/cugraph/tests/test_renumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ def test_renumber_files(graph_file):

translate = 1000

source_translated = cudf.Series([x + translate for x in sources])
dest_translated = cudf.Series([x + translate for x in destinations])
source_translated = cudf.Series([x + translate for x in sources.
values_host])
dest_translated = cudf.Series([x + translate for x in destinations.
values_host])

src, dst, numbering = cugraph.renumber(source_translated, dest_translated)

Expand All @@ -180,8 +182,9 @@ def test_renumber_files_col(graph_file):
translate = 1000

gdf = cudf.DataFrame()
gdf['src'] = cudf.Series([x + translate for x in sources])
gdf['dst'] = cudf.Series([x + translate for x in destinations])
gdf['src'] = cudf.Series([x + translate for x in sources.values_host])
gdf['dst'] = cudf.Series([x + translate for x in destinations.
values_host])

src, dst, numbering = cugraph.renumber_from_cudf(gdf, ['src'], ['dst'])

Expand Down