Skip to content

Commit

Permalink
Merge pull request #39 from rapidsai/branch-0.18
Browse files Browse the repository at this point in the history
Update forked branch-0.18
  • Loading branch information
aschaffer authored Dec 30, 2020
2 parents a584e0b + 70d9abd commit 338b2d4
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 42 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# cuGraph 0.18.0 (Date TBD)

## New Features
Expand All @@ -6,8 +7,7 @@

## Bug Fixes

# cuGraph 0.17.0 (Date TBD)

# cuGraph 0.17.0 (10 Dec 2020)
## New Features
- PR #1276 MST
- PR #1245 Add functions to add pandas and numpy compatibility
Expand Down Expand Up @@ -40,7 +40,8 @@
- PR #1275 Force local artifact conda install
- PR #1285 Move codecov upload to gpu build script
- PR #1290 Update weights check in bc and graph prims wrappers

- PR #1299 Update doc and notebook
- PR #1304 Enable all GPU archs for test builds

# cuGraph 0.16.0 (21 Oct 2020)

Expand Down
2 changes: 1 addition & 1 deletion ci/gpu/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ conda list --show-channel-urls

if [[ -z "$PROJECT_FLASH" || "$PROJECT_FLASH" == "0" ]]; then
gpuci_logger "Build from source"
$WORKSPACE/build.sh clean libcugraph cugraph
$WORKSPACE/build.sh -v clean libcugraph cugraph --allgpuarch
fi

################################################################################
Expand Down
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.*
- 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: 6 additions & 5 deletions cpp/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,12 @@ ConfigureTest(EXPERIMENTAL_PAGERANK_TEST "${EXPERIMENTAL_PAGERANK_TEST_SRCS}" ""
###################################################################################################
# - Experimental LOUVAIN tests -------------------------------------------------------------------

set(EXPERIMENTAL_LOUVAIN_TEST_SRCS
"${CMAKE_SOURCE_DIR}/../thirdparty/mmio/mmio.c"
"${CMAKE_CURRENT_SOURCE_DIR}/experimental/louvain_test.cu")

ConfigureTest(EXPERIMENTAL_LOUVAIN_TEST "${EXPERIMENTAL_LOUVAIN_TEST_SRCS}" "")
# FIXME: Re-enable once failures are fixed
#set(EXPERIMENTAL_LOUVAIN_TEST_SRCS
# "${CMAKE_SOURCE_DIR}/../thirdparty/mmio/mmio.c"
# "${CMAKE_CURRENT_SOURCE_DIR}/experimental/louvain_test.cu")
#
#ConfigureTest(EXPERIMENTAL_LOUVAIN_TEST "${EXPERIMENTAL_LOUVAIN_TEST_SRCS}" "")

###################################################################################################
# - Experimental KATZ_CENTRALITY tests ------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion cpp/tests/experimental/pagerank_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ INSTANTIATE_TEST_CASE_P(
PageRank_Usecase("test/datasets/ljournal-2008.mtx", 0.0, true),
PageRank_Usecase("test/datasets/ljournal-2008.mtx", 0.5, true),
PageRank_Usecase("test/datasets/webbase-1M.mtx", 0.0, false),
PageRank_Usecase("test/datasets/webbase-1M.mtx", 0.5, false),
// FIXME: Re-enable test after failures are addressed
// PageRank_Usecase("test/datasets/webbase-1M.mtx", 0.5, false),
PageRank_Usecase("test/datasets/webbase-1M.mtx", 0.0, true),
PageRank_Usecase("test/datasets/webbase-1M.mtx", 0.5, true)));

Expand Down
7 changes: 2 additions & 5 deletions notebooks/demo/mg_pagerank.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,10 @@
"source": [
"# Create a directed graph using the source (src) and destination (dst) vertex pairs from the Dataframe \n",
"G = cugraph.DiGraph()\n",
"G.from_dask_cudf_edgelist(e_list, source='src', destination='dst', renumber=False)\n",
"\n",
"# (optional) request the transposed here so that we can analyse pagerank solver time alone\n",
"G.compute_local_data(by='dst')\n",
"G.from_dask_cudf_edgelist(e_list, source='src', destination='dst')\n",
"\n",
"# Print time\n",
"print(\"Read, load and transpose: \", time.time()-t_start, \"s\")"
"print(\"Read, load and renumber: \", time.time()-t_start, \"s\")"
]
},
{
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
6 changes: 3 additions & 3 deletions python/cugraph/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@

MATRIX_INPUT_TYPES = [
pytest.param(
cp_coo_matrix, marks=pytest.mark.cupy_types, id="CuPy.coo_matrix"
cp_coo_matrix, marks=pytest.mark.matrix_types, id="CuPy.coo_matrix"
),
pytest.param(
cp_csr_matrix, marks=pytest.mark.cupy_types, id="CuPy.csr_matrix"
cp_csr_matrix, marks=pytest.mark.matrix_types, id="CuPy.csr_matrix"
),
pytest.param(
cp_csc_matrix, marks=pytest.mark.cupy_types, id="CuPy.csc_matrix"
cp_csc_matrix, marks=pytest.mark.matrix_types, id="CuPy.csc_matrix"
),
]

Expand Down
14 changes: 0 additions & 14 deletions python/cugraph/traversal/sssp.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,26 +156,12 @@ def sssp(G,
Parameters
----------
<<<<<<< HEAD
graph : cugraph.Graph, networkx.Graph, CuPy or SciPy sparse matrix Graph or
matrix object, which should contain the connectivity information. Edge
weights, if present, should be single or double precision floating
point values.
source : int
Index of the source vertex.
=======
graph : cuGraph.Graph, NetworkX.Graph, or CuPy sparse COO matrix
cuGraph graph descriptor with connectivity information. Edge weights,
if present, should be single or double precision floating point values.
source : Dependant on graph type. Index of the source vertex.
If graph is an instance of cuGraph.Graph or CuPy sparse COO matrix:
int
If graph is an instance of a NetworkX.Graph:
str
>>>>>>> Document shortest_path_length and sssp behavior
Returns
-------
Expand Down

0 comments on commit 338b2d4

Please sign in to comment.