diff --git a/ci/test_python.sh b/ci/test_python.sh index 5892c37e35b..2b8a6347066 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -63,7 +63,16 @@ pytest \ tests popd -# FIXME: TEMPORARILY disable single-GPU "MG" testing +# Test runs that include tests that use dask require +# --import-mode=append. Those tests start a LocalCUDACluster that inherits +# changes from pytest's modifications to PYTHONPATH (which defaults to +# prepending source tree paths to PYTHONPATH). This causes the +# LocalCUDACluster subprocess to import cugraph from the source tree instead of +# the install location, and in most cases, the source tree does not have +# extensions built in-place and will result in ImportErrors. +# +# FIXME: TEMPORARILY disable MG PropertyGraph tests (experimental) tests and +# bulk sampler IO tests (hangs in CI) rapids-logger "pytest cugraph" pushd python/cugraph/cugraph DASK_WORKER_DEVICES="0" \ @@ -72,6 +81,7 @@ DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT="1000s" \ DASK_CUDA_WAIT_WORKERS_MIN_TIMEOUT="1000s" \ pytest \ -v \ + --import-mode=append \ --benchmark-disable \ --cache-clear \ --junitxml="${RAPIDS_TESTS_DIR}/junit-cugraph.xml" \ @@ -79,7 +89,7 @@ pytest \ --cov=cugraph \ --cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cugraph-coverage.xml" \ --cov-report=term \ - -k "not test_property_graph_mg" \ + -k "not test_property_graph_mg and not test_bulk_sampler_io" \ tests popd diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index 428efd4ed21..8c5832e412f 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. set -eoxu pipefail @@ -21,10 +21,21 @@ arch=$(uname -m) if [[ "${arch}" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then python ./ci/wheel_smoke_test_${package_name}.py else - # FIXME: TEMPORARILY disable single-GPU "MG" testing + # Test runs that include tests that use dask require + # --import-mode=append. See test_python.sh for details. + # FIXME: Adding PY_IGNORE_IMPORTMISMATCH=1 to workaround conftest.py import + # mismatch error seen by nx-cugraph after using pytest 8 and + # --import-mode=append. RAPIDS_DATASET_ROOT_DIR=`pwd`/datasets \ + PY_IGNORE_IMPORTMISMATCH=1 \ + DASK_WORKER_DEVICES="0" \ DASK_DISTRIBUTED__SCHEDULER__WORKER_TTL="1000s" \ DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT="1000s" \ DASK_CUDA_WAIT_WORKERS_MIN_TIMEOUT="1000s" \ - python -m pytest ./python/${package_name}/${python_package_name}/tests + python -m pytest \ + -v \ + --import-mode=append \ + --benchmark-disable \ + -k "not test_property_graph_mg and not test_bulk_sampler_io" \ + ./python/${package_name}/${python_package_name}/tests fi diff --git a/cpp/cmake/thirdparty/get_raft.cmake b/cpp/cmake/thirdparty/get_raft.cmake index 015b5b07920..8f56372c81a 100644 --- a/cpp/cmake/thirdparty/get_raft.cmake +++ b/cpp/cmake/thirdparty/get_raft.cmake @@ -1,5 +1,5 @@ #============================================================================= -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,6 +52,7 @@ function(find_and_configure_raft) "RAFT_COMPILE_LIBRARY ${PKG_COMPILE_RAFT_LIB}" "BUILD_TESTS OFF" "BUILD_BENCH OFF" + "BUILD_CAGRA_HNSWLIB OFF" ) if(raft_ADDED) diff --git a/python/nx-cugraph/nx_cugraph/interface.py b/python/nx-cugraph/nx_cugraph/interface.py index 04591c0e9e3..a57074aabb0 100644 --- a/python/nx-cugraph/nx_cugraph/interface.py +++ b/python/nx-cugraph/nx_cugraph/interface.py @@ -80,18 +80,26 @@ def key(testpath): nxver = parse(nx.__version__) if nxver.major == 3 and nxver.minor <= 2: - # Networkx versions prior to 3.2.1 have tests written to expect - # sp.sparse.linalg.ArpackNoConvergence exceptions raised on no - # convergence in HITS. Newer versions since the merge of - # https://github.com/networkx/networkx/pull/7084 expect - # nx.PowerIterationFailedConvergence, which is what nx_cugraph.hits - # raises, so we mark them as xfail for previous versions of NX. xfail.update( { + # NetworkX versions prior to 3.2.1 have tests written to + # expect sp.sparse.linalg.ArpackNoConvergence exceptions + # raised on no convergence in HITS. Newer versions since + # the merge of + # https://github.com/networkx/networkx/pull/7084 expect + # nx.PowerIterationFailedConvergence, which is what + # nx_cugraph.hits raises, so we mark them as xfail for + # previous versions of NX. key( "test_hits.py:TestHITS.test_hits_not_convergent" ): "nx_cugraph.hits raises updated exceptions not caught in " "these tests", + # NetworkX versions 3.2 and older contain tests that fail + # with pytest>=8. Assume pytest>=8 and mark xfail. + key( + "test_strongly_connected.py:" + "TestStronglyConnected.test_connected_raise" + ): "test is incompatible with pytest>=8", } )