Skip to content

Commit

Permalink
Merge pull request #37 from rapidsai/branch-0.17
Browse files Browse the repository at this point in the history
Merge latest release 0.17
  • Loading branch information
aschaffer authored Nov 30, 2020
2 parents 3fc93f2 + b98175e commit acf15bc
Show file tree
Hide file tree
Showing 113 changed files with 5,479 additions and 4,734 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# cuGraph 0.17.0 (Date TBD)

## New Features
- PR #1276 MST
- PR #1245 Add functions to add pandas and numpy compatibility
- PR #1260 Add katz_centrality mnmg wrapper
- PR #1264 CuPy sparse matrix input support for WCC, SCC, SSSP, and BFS
- PR #1265 Implement Hungarian Algorithm
- PR #1274 Add generic from_edgelist() and from_adjlist() APIs
- PR #1279 Add self loop check variable in graph

## Improvements
- PR #1227 Pin cmake policies to cmake 3.17 version
- PR #1267 Compile time improvements via Explicit Instantiation Declarations.
- PR #1269 Removed old db code that was not being used
- PR #1271 Add extra check to make SG Louvain deterministic
- PR #1273 Update Force Atlas 2 notebook, wrapper and coding style

## Bug Fixes
- PR #1237 update tests for assymetric graphs, enable personalization pagerank
- PR #1242 Calling gunrock cmake using explicit -D options, re-enabling C++ tests
- PR #1246 Use latest Gunrock, update HITS implementation
- PR #1250 Updated cuco commit hash to latest as of 2020-10-30 and removed unneeded GIT_SHALLOW param
- PR #1251 Changed the MG context testing class to use updated parameters passed in from the individual tests
- PR #1253 MG test fixes: updated additional comms.initialize() calls, fixed dask DataFrame comparisons

- PR #1270 Raise exception for p2p, disable bottom up approach for bfs
- PR #1275 Force local artifact conda install

# cuGraph 0.16.0 (21 Oct 2020)

Expand Down
54 changes: 1 addition & 53 deletions benchmarks/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,62 +10,10 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from itertools import product

import pytest


def genFixtureParamsProduct(*args):
"""
Returns the cartesian product of the param lists passed in. The lists must
be flat lists of pytest.param objects, and the result will be a flat list
of pytest.param objects with values and meta-data combined accordingly. A
flat list of pytest.param objects is required for pytest fixtures to
properly recognize the params. The combinations also include ids generated
from the param values and id names associated with each list. For example:
genFixtureParamsProduct( ([pytest.param(True, marks=[pytest.mark.A_good]),
pytest.param(False, marks=[pytest.mark.A_bad])],
"A"),
([pytest.param(True, marks=[pytest.mark.B_good]),
pytest.param(False, marks=[pytest.mark.B_bad])],
"B") )
results in fixture param combinations:
True, True - marks=[A_good, B_good] - id="A=True,B=True"
True, False - marks=[A_good, B_bad] - id="A=True,B=False"
False, True - marks=[A_bad, B_good] - id="A=False,B=True"
False, False - marks=[A_bad, B_bad] - id="A=False,B=False"
Simply using itertools.product on the lists would result in a list of
sublists of individual param objects (ie. not "merged"), which would not be
recognized properly as params for a fixture by pytest.
NOTE: This function is only needed for parameterized fixtures.
Tests/benchmarks will automatically get this behavior when specifying
multiple @pytest.mark.parameterize(param_name, param_value_list)
decorators.
"""
# Enforce that each arg is a list of pytest.param objs and separate params
# and IDs.
paramLists = []
ids = []
paramType = pytest.param().__class__
for (paramList, id) in args:
for param in paramList:
assert isinstance(param, paramType)
paramLists.append(paramList)
ids.append(id)

retList = []
for paramCombo in product(*paramLists):
values = [p.values[0] for p in paramCombo]
marks = [m for p in paramCombo for m in p.marks]
comboid = ",".join(["%s=%s" % (id, p.values[0])
for (p, id) in zip(paramCombo, ids)])
retList.append(pytest.param(values, marks=marks, id=comboid))
return retList
from cugraph.tests.utils import genFixtureParamsProduct


# FIXME: write and use mechanism described here for specifying datasets:
Expand Down
32 changes: 25 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ARGS=$*
# script, and that this script resides in the repo dir!
REPODIR=$(cd $(dirname $0); pwd)

VALIDARGS="clean libcugraph cugraph docs -v -g -n --show_depr_warn -h --help"
VALIDARGS="clean libcugraph cugraph docs -v -g -n --allgpuarch --show_depr_warn -h --help"
HELP="$0 [<target> ...] [<flag> ...]
where <target> is:
clean - remove all existing build artifacts and configuration (start over)
Expand All @@ -29,26 +29,29 @@ HELP="$0 [<target> ...] [<flag> ...]
-v - verbose build mode
-g - build for debug
-n - no install step
--allgpuarch - build for all supported GPU architectures
--show_depr_warn - show cmake deprecation warnings
-h - print this text
default action (no args) is to build and install 'libcugraph' then 'cugraph' targets
default action (no args) is to build and install 'libcugraph' then 'cugraph' targets and then docs
"
LIBCUGRAPH_BUILD_DIR=${LIBCUGRAPH_BUILD_DIR:=${REPODIR}/cpp/build}
CUGRAPH_BUILD_DIR=${REPODIR}/python/build
BUILD_DIRS="${LIBCUGRAPH_BUILD_DIR} ${CUGRAPH_BUILD_DIR}"

# Set defaults for vars modified by flags to this script
ARG_COUNT=${NUMARGS}
VERBOSE=""
BUILD_TYPE=Release
INSTALL_TARGET=install
BUILD_DISABLE_DEPRECATION_WARNING=ON
BUILD_ALL_GPU_ARCH=0

# Set defaults for vars that may not have been defined externally
# FIXME: if PREFIX is not set, check CONDA_PREFIX, but there is no fallback
# from there!
INSTALL_PREFIX=${PREFIX:=${CONDA_PREFIX}}
PARALLEL_LEVEL=${PARALLEL_LEVEL:=""}
PARALLEL_LEVEL=${PARALLEL_LEVEL:=`nproc`}
BUILD_ABI=${BUILD_ABI:=ON}

function hasArg {
Expand All @@ -73,15 +76,22 @@ fi
# Process flags
if hasArg -v; then
VERBOSE=1
ARG_COUNT=$((ARG_COUNT -1))
fi
if hasArg -g; then
BUILD_TYPE=Debug
ARG_COUNT=$((ARG_COUNT -1))
fi
if hasArg -n; then
INSTALL_TARGET=""
ARG_COUNT=$((ARG_COUNT -1))
fi
if hasArg --allgpuarch; then
BUILD_ALL_GPU_ARCH=1
fi
if hasArg --show_depr_warn; then
BUILD_DISABLE_DEPRECATION_WARNING=OFF
ARG_COUNT=$((ARG_COUNT -1))
fi

# If clean given, run it prior to any other steps
Expand All @@ -100,18 +110,26 @@ fi

################################################################################
# Configure, build, and install libcugraph
if (( ${NUMARGS} == 0 )) || hasArg libcugraph; then
if (( ${ARG_COUNT} == 0 )) || hasArg libcugraph; then
if (( ${BUILD_ALL_GPU_ARCH} == 0 )); then
GPU_ARCH=""
echo "Building for the architecture of the GPU in the system..."
else
GPU_ARCH="-DGPU_ARCHS=ALL"
echo "Building for *ALL* supported GPU architectures..."
fi

mkdir -p ${LIBCUGRAPH_BUILD_DIR}
cd ${LIBCUGRAPH_BUILD_DIR}
cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
${GPU_ARCH} \
-DDISABLE_DEPRECATION_WARNING=${BUILD_DISABLE_DEPRECATION_WARNING} \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
make -j${PARALLEL_LEVEL} VERBOSE=${VERBOSE} ${INSTALL_TARGET}
fi

# Build and install the cugraph Python package
if (( ${NUMARGS} == 0 )) || hasArg cugraph; then
if (( ${ARG_COUNT} == 0 )) || hasArg cugraph; then

cd ${REPODIR}/python
if [[ ${INSTALL_TARGET} != "" ]]; then
Expand All @@ -124,7 +142,7 @@ fi

################################################################################
# Build the docs
if (( ${NUMARGS} == 0 )) || hasArg docs; then
if (( ${ARG_COUNT} == 0 )) || hasArg docs; then

if [ ! -d ${LIBCUGRAPH_BUILD_DIR} ]; then
mkdir -p ${LIBCUGRAPH_BUILD_DIR}
Expand Down
10 changes: 7 additions & 3 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,20 @@ for gt in gtests/*; do
done

if [[ "$PROJECT_FLASH" == "1" ]]; then
echo "Installing libcugraph..."
conda install -c $WORKSPACE/ci/artifacts/cugraph/cpu/conda-bld/ libcugraph
CONDA_FILE=`find $WORKSPACE/ci/artifacts/cugraph/cpu/conda-bld/ -name "libcugraph*.tar.bz2"`
CONDA_FILE=`basename "$CONDA_FILE" .tar.bz2` #get filename without extension
CONDA_FILE=${CONDA_FILE//-/=} #convert to conda install
echo "Installing $CONDA_FILE"
conda install -c $WORKSPACE/ci/artifacts/cugraph/cpu/conda-bld/ "$CONDA_FILE"

export LIBCUGRAPH_BUILD_DIR="$WORKSPACE/ci/artifacts/cugraph/cpu/conda_work/cpp/build"
echo "Build cugraph..."
$WORKSPACE/build.sh cugraph
fi

echo "Python pytest for cuGraph..."
cd ${CUGRAPH_ROOT}/python
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph.xml -v --cov-config=.coveragerc --cov=cugraph --cov-report=xml:${WORKSPACE}/python/cugraph/cugraph-coverage.xml --cov-report term --ignore=cugraph/raft
pytest --cache-clear --junitxml=${CUGRAPH_ROOT}/junit-cugraph.xml -v --cov-config=.coveragerc --cov=cugraph --cov-report=xml:${WORKSPACE}/python/cugraph/cugraph-coverage.xml --cov-report term --ignore=cugraph/raft --benchmark-disable
ERRORCODE=$((ERRORCODE | $?))

echo "Python benchmarks for cuGraph (running as tests)..."
Expand Down
5 changes: 5 additions & 0 deletions conda/environments/cugraph_dev_cuda10.1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- cudf=0.17.*
- libcudf=0.17.*
- rmm=0.17.*
- cuxfilter=0.17.*
- librmm=0.17.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -29,6 +30,9 @@ dependencies:
- cython>=0.29,<0.30
- pytest
- scikit-learn>=0.23.1
- colorcet
- holoviews
- datashader
- sphinx
- sphinx_rtd_theme
- sphinxcontrib-websupport
Expand All @@ -40,3 +44,4 @@ dependencies:
- pip
- libcypher-parser
- rapids-pytest-benchmark
- doxygen
5 changes: 5 additions & 0 deletions conda/environments/cugraph_dev_cuda10.2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- cudf=0.17.*
- libcudf=0.17.*
- rmm=0.17.*
- cuxfilter=0.17.*
- librmm=0.17.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -29,6 +30,9 @@ dependencies:
- cython>=0.29,<0.30
- pytest
- scikit-learn>=0.23.1
- colorcet
- holoviews
- datashader
- sphinx
- sphinx_rtd_theme
- sphinxcontrib-websupport
Expand All @@ -40,3 +44,4 @@ dependencies:
- pip
- libcypher-parser
- rapids-pytest-benchmark
- doxygen
5 changes: 5 additions & 0 deletions conda/environments/cugraph_dev_cuda11.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- cudf=0.17.*
- libcudf=0.17.*
- rmm=0.17.*
- cuxfilter=0.17.*
- librmm=0.17.*
- dask>=2.12.0
- distributed>=2.12.0
Expand All @@ -29,6 +30,9 @@ dependencies:
- cython>=0.29,<0.30
- pytest
- scikit-learn>=0.23.1
- colorcet
- datashader
- holoviews
- sphinx
- sphinx_rtd_theme
- sphinxcontrib-websupport
Expand All @@ -40,3 +44,4 @@ dependencies:
- pip
- libcypher-parser
- rapids-pytest-benchmark
- doxygen
2 changes: 1 addition & 1 deletion conda/recipes/cugraph/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

# This assumes the script is executed from the root of the repo directory
./build.sh cugraph
./build.sh cugraph --allgpuarch
2 changes: 1 addition & 1 deletion conda/recipes/libcugraph/build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

# This assumes the script is executed from the root of the repo directory
./build.sh libcugraph -v
./build.sh libcugraph -v --allgpuarch
Loading

0 comments on commit acf15bc

Please sign in to comment.