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] Updated cuxfilter to 0.18, removed datashader indirect dependency in conda dev .yml files #1311

Merged
merged 6 commits into from
Dec 17, 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
1 change: 1 addition & 0 deletions ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,5 @@ for FILE in conda/environments/*.yml; do
sed_runner "s/dask-cuda=${CURRENT_SHORT_TAG}/dask-cuda=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/dask-cudf=${CURRENT_SHORT_TAG}/dask-cudf=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/ucx-py=${CURRENT_SHORT_TAG}/ucx-py=${NEXT_SHORT_TAG}/g" ${FILE};
sed_runner "s/cuxfilter=${CURRENT_SHORT_TAG}/cuxfilter=${NEXT_SHORT_TAG}/g" ${FILE};
done
3 changes: 1 addition & 2 deletions conda/environments/cugraph_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- cudf=0.18.*
- libcudf=0.18.*
- rmm=0.18.*
- cuxfilter=0.17.*
- cuxfilter=0.18.*
rlratzel marked this conversation as resolved.
Show resolved Hide resolved
- librmm=0.18.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -32,7 +32,6 @@ dependencies:
- scikit-learn>=0.23.1
- colorcet
- holoviews
- datashader
- sphinx
- sphinx_rtd_theme
- sphinxcontrib-websupport
Expand Down
3 changes: 1 addition & 2 deletions conda/environments/cugraph_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- cudf=0.18.*
- libcudf=0.18.*
- rmm=0.18.*
- cuxfilter=0.17.*
- cuxfilter=0.18.*
- librmm=0.18.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -32,7 +32,6 @@ dependencies:
- scikit-learn>=0.23.1
- colorcet
- holoviews
- datashader
- sphinx
- sphinx_rtd_theme
- sphinxcontrib-websupport
Expand Down
3 changes: 1 addition & 2 deletions conda/environments/cugraph_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dependencies:
- cudf=0.18.*
- libcudf=0.18.*
- rmm=0.18.*
- cuxfilter=0.17.*
- cuxfilter=0.18.*
- librmm=0.18.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -31,7 +31,6 @@ dependencies:
- pytest
- scikit-learn>=0.23.1
- colorcet
- datashader
- holoviews
- sphinx
- sphinx_rtd_theme
Expand Down
11 changes: 9 additions & 2 deletions python/cugraph/centrality/betweenness_centrality.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ def edge_betweenness_centrality(
>>> G.from_cudf_edgelist(gdf, source='0', destination='1')
>>> ebc = cugraph.edge_betweenness_centrality(G)
"""

if weight is not None:
raise NotImplementedError(
"weighted implementation of betweenness "
Expand All @@ -254,8 +253,16 @@ def edge_betweenness_centrality(
df = G.unrenumber(df, "dst")

if type(G) is cugraph.Graph:
# select the lower triangle of the df based on src/dst vertex value
lower_triangle = df['src'] >= df['dst']
df[["src", "dst"]][lower_triangle] = df[["dst", "src"]][lower_triangle]
# swap the src and dst vertices for the lower triangle only. Because
# this is a symmeterized graph, this operation results in a df with
# multiple src/dst entries.
df['src'][lower_triangle], df['dst'][lower_triangle] = \
df['dst'][lower_triangle], df['src'][lower_triangle]
# overwrite the df with the sum of the values for all alike src/dst
# vertex pairs, resulting in half the edges of the original df from the
# symmeterized graph.
df = df.groupby(by=["src", "dst"]).sum().reset_index()

if isNx is True:
Expand Down
5 changes: 3 additions & 2 deletions python/cugraph/structure/graph_primtypes.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ cdef GraphCOOViewType get_coo_graph_view(input_graph, bool weighted=True, GraphC
if not input_graph.edgelist:
input_graph.view_edge_list()

num_edges = input_graph.number_of_edges(directed_edges=True)
num_verts = input_graph.number_of_vertices()

cdef uintptr_t c_src = input_graph.edgelist.edgelist_df['src'].__cuda_array_interface__['data'][0]
cdef uintptr_t c_dst = input_graph.edgelist.edgelist_df['dst'].__cuda_array_interface__['data'][0]
cdef uintptr_t c_weights = <uintptr_t>NULL
Expand All @@ -101,8 +104,6 @@ cdef GraphCOOViewType get_coo_graph_view(input_graph, bool weighted=True, GraphC
if input_graph.edgelist.weights and weighted:
c_weights = input_graph.edgelist.edgelist_df['weights'].__cuda_array_interface__['data'][0]

num_verts = input_graph.number_of_vertices()
num_edges = input_graph.number_of_edges(directed_edges=True)
cdef GraphCOOViewType in_graph
if GraphCOOViewType is GraphCOOViewFloat:
in_graph = GraphCOOViewFloat(<int*>c_src, <int*>c_dst, <float*>c_weights, num_verts, num_edges)
Expand Down