diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b272fb43e35..96387b13d11 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -113,26 +113,6 @@ jobs: sha: ${{ inputs.sha }} date: ${{ inputs.date }} package-name: cugraph - wheel-build-nx-cugraph: - needs: wheel-publish-pylibcugraph - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 - with: - build_type: ${{ inputs.build_type || 'branch' }} - branch: ${{ inputs.branch }} - sha: ${{ inputs.sha }} - date: ${{ inputs.date }} - script: ci/build_wheel_nx-cugraph.sh - wheel-publish-nx-cugraph: - needs: wheel-build-nx-cugraph - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.12 - with: - build_type: ${{ inputs.build_type || 'branch' }} - branch: ${{ inputs.branch }} - sha: ${{ inputs.sha }} - date: ${{ inputs.date }} - package-name: nx-cugraph wheel-build-cugraph-dgl: needs: wheel-publish-cugraph secrets: inherit diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 0a33f5488a6..3797086ad5d 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -25,8 +25,6 @@ jobs: - wheel-tests-pylibcugraph - wheel-build-cugraph - wheel-tests-cugraph - - wheel-build-nx-cugraph - - wheel-tests-nx-cugraph - wheel-build-cugraph-dgl - wheel-tests-cugraph-dgl - wheel-build-cugraph-pyg @@ -167,21 +165,6 @@ jobs: with: build_type: pull-request script: ci/test_wheel_cugraph.sh - wheel-build-nx-cugraph: - needs: wheel-tests-pylibcugraph - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 - with: - build_type: pull-request - script: ci/build_wheel_nx-cugraph.sh - wheel-tests-nx-cugraph: - needs: [wheel-build-nx-cugraph, changed-files] - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 - if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python - with: - build_type: pull-request - script: ci/test_wheel_nx-cugraph.sh wheel-build-cugraph-dgl: needs: wheel-tests-cugraph secrets: inherit diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5fbdd276bd6..4e4caf11500 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -58,15 +58,6 @@ jobs: date: ${{ inputs.date }} sha: ${{ inputs.sha }} script: ci/test_wheel_cugraph.sh - wheel-tests-nx-cugraph: - secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 - with: - build_type: nightly - branch: ${{ inputs.branch }} - date: ${{ inputs.date }} - sha: ${{ inputs.sha }} - script: ci/test_wheel_nx-cugraph.sh wheel-tests-cugraph-dgl: secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 diff --git a/ci/build_python.sh b/ci/build_python.sh index af9c3c56403..5ddd764737a 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -40,16 +40,6 @@ rapids-conda-retry mambabuild \ sccache --show-adv-stats -# NOTE: nothing in nx-cugraph is CUDA-specific, but it is built on each CUDA -# platform to ensure it is included in each set of artifacts, since test -# scripts only install from one set of artifacts based on the CUDA version used -# for the test run. -rapids-conda-retry mambabuild \ - --no-test \ - --channel "${CPP_CHANNEL}" \ - --channel "${RAPIDS_CONDA_BLD_OUTPUT_DIR}" \ - conda/recipes/nx-cugraph - # NOTE: nothing in the cugraph-service packages are CUDA-specific, but they are # built on each CUDA platform to ensure they are included in each set of # artifacts, since test scripts only install from one set of artifacts based on diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 944975c55ee..8c4eb94cf86 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -30,8 +30,7 @@ python -m pip wheel \ sccache --show-adv-stats # pure-python packages should be marked as pure, and not have auditwheel run on them. -if [[ ${package_name} == "nx-cugraph" ]] || \ - [[ ${package_name} == "cugraph-dgl" ]] || \ +if [[ ${package_name} == "cugraph-dgl" ]] || \ [[ ${package_name} == "cugraph-pyg" ]] || \ [[ ${package_name} == "cugraph-equivariant" ]]; then RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-upload-wheels-to-s3 python dist diff --git a/ci/build_wheel_nx-cugraph.sh b/ci/build_wheel_nx-cugraph.sh deleted file mode 100755 index 4481de1283d..00000000000 --- a/ci/build_wheel_nx-cugraph.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. - -set -euo pipefail - -./ci/build_wheel.sh nx-cugraph python/nx-cugraph diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 5859ebde953..be1988e31dd 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -106,8 +106,6 @@ for FILE in .github/workflows/*.yaml; do sed_runner "s/dask-cuda.git@branch-[0-9][0-9].[0-9][0-9]/dask-cuda.git@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done -sed_runner "s/branch-.*/branch-${NEXT_SHORT_TAG}/g" python/nx-cugraph/README.md - # .devcontainer files find .devcontainer/ -type f -name devcontainer.json -print0 | while IFS= read -r -d '' filename; do sed_runner "s@rapidsai/devcontainers:[0-9.]*@rapidsai/devcontainers:${NEXT_SHORT_TAG}@g" "${filename}" diff --git a/ci/run_nx_cugraph_pytests.sh b/ci/run_nx_cugraph_pytests.sh deleted file mode 100755 index 0e309d1e2d4..00000000000 --- a/ci/run_nx_cugraph_pytests.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Copyright (c) 2024, NVIDIA CORPORATION. - -set -euo pipefail - -# Support invoking run_nx_cugraph_pytests.sh outside the script directory -cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"/../python/nx-cugraph/nx_cugraph - -NX_CUGRAPH_USE_COMPAT_GRAPHS=False pytest --capture=no --cache-clear --benchmark-disable "$@" tests -NX_CUGRAPH_USE_COMPAT_GRAPHS=True pytest --capture=no --cache-clear --benchmark-disable "$@" tests diff --git a/ci/test_python.sh b/ci/test_python.sh index 29b4c7be190..57d60bf42ed 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -39,7 +39,6 @@ rapids-mamba-retry install \ "libcugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \ "pylibcugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \ "cugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \ - "nx-cugraph=${RAPIDS_VERSION_MAJOR_MINOR}.*" \ "cugraph-service-server=${RAPIDS_VERSION_MAJOR_MINOR}.*" \ "cugraph-service-client=${RAPIDS_VERSION_MAJOR_MINOR}.*" @@ -91,44 +90,6 @@ rapids-logger "pytest cugraph" rapids-logger "pytest cugraph benchmarks (run as tests)" ./ci/run_cugraph_benchmark_pytests.sh --verbose -rapids-logger "pytest nx-cugraph" -./ci/run_nx_cugraph_pytests.sh \ - --verbose \ - --junitxml="${RAPIDS_TESTS_DIR}/junit-nx-cugraph.xml" \ - --cov-config=../../.coveragerc \ - --cov=nx_cugraph \ - --cov-report=xml:"${RAPIDS_COVERAGE_DIR}/nx-cugraph-coverage.xml" \ - --cov-report=term - -rapids-logger "pytest networkx using nx-cugraph backend" -pushd python/nx-cugraph/nx_cugraph -../run_nx_tests.sh -# run_nx_tests.sh outputs coverage data, so check that total coverage is >0.0% -# in case nx-cugraph failed to load but fallback mode allowed the run to pass. -_coverage=$(coverage report|grep "^TOTAL") -echo "nx-cugraph coverage from networkx tests: $_coverage" -echo $_coverage | awk '{ if ($NF == "0.0%") exit 1 }' -# Ensure all algorithms were called by comparing covered lines to function lines. -# Run our tests again (they're fast enough) to add their coverage, then create coverage.json -NX_CUGRAPH_USE_COMPAT_GRAPHS=False pytest \ - --pyargs nx_cugraph \ - --config-file=../pyproject.toml \ - --cov-config=../pyproject.toml \ - --cov=nx_cugraph \ - --cov-append \ - --cov-report= -coverage report \ - --include="*/nx_cugraph/algorithms/*" \ - --omit=__init__.py \ - --show-missing \ - --rcfile=../pyproject.toml -coverage json --rcfile=../pyproject.toml -python -m nx_cugraph.tests.ensure_algos_covered -# Exercise (and show results of) scripts that show implemented networkx algorithms -python -m nx_cugraph.scripts.print_tree --dispatch-name --plc --incomplete --different -python -m nx_cugraph.scripts.print_table -popd - rapids-logger "pytest cugraph-service (single GPU)" ./ci/run_cugraph_service_pytests.sh \ --verbose \ diff --git a/ci/test_wheel.sh b/ci/test_wheel.sh index dfba25bbe1a..b5cd90996c7 100755 --- a/ci/test_wheel.sh +++ b/ci/test_wheel.sh @@ -10,12 +10,8 @@ python_package_name=$(echo ${package_name}|sed 's/-/_/g') mkdir -p ./dist RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -# nx-cugraph is a pure wheel, which is part of generating the download path -if [[ "${package_name}" == "nx-cugraph" ]]; then - RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-s3 ./dist -else - RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist -fi +RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./dist + # use 'ls' to expand wildcard before adding `[extra]` requires for pip # pip creates wheels using python package names python -m pip install $(ls ./dist/${python_package_name}*.whl)[test] @@ -36,7 +32,6 @@ else DASK_DISTRIBUTED__SCHEDULER__WORKER_TTL="1000s" \ DASK_DISTRIBUTED__COMM__TIMEOUTS__CONNECT="1000s" \ DASK_CUDA_WAIT_WORKERS_MIN_TIMEOUT="1000s" \ - NX_CUGRAPH_USE_COMPAT_GRAPHS=False \ python -m pytest \ -v \ --import-mode=append \ diff --git a/ci/test_wheel_nx-cugraph.sh b/ci/test_wheel_nx-cugraph.sh deleted file mode 100755 index 024169ae698..00000000000 --- a/ci/test_wheel_nx-cugraph.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -# Copyright (c) 2023-2024, NVIDIA CORPORATION. - -set -eoxu pipefail - -# Download wheels built during this job. -RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -RAPIDS_PY_WHEEL_NAME="pylibcugraph_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 ./local-deps -python -m pip install ./local-deps/*.whl - -./ci/test_wheel.sh nx-cugraph diff --git a/ci/wheel_smoke_test_nx-cugraph.py b/ci/wheel_smoke_test_nx-cugraph.py deleted file mode 100644 index 10d26e3aac7..00000000000 --- a/ci/wheel_smoke_test_nx-cugraph.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# 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. - -import math - -import networkx as nx -import nx_cugraph as nxcg - - -if __name__ == "__main__": - G = nx.Graph() - G.add_edges_from([(0, 1), (1, 2), (2, 3)]) - - nx_result = nx.betweenness_centrality(G) - # nx_cugraph is intended to be called via the NetworkX dispatcher, like - # this: - # nxcu_result = nx.betweenness_centrality(G, backend="cugraph") - # - # but here it is being called directly since the NetworkX version that - # supports the "backend" kwarg may not be available in the testing env. - nxcu_result = nxcg.betweenness_centrality(G) - - nx_nodes, nxcu_nodes = nx_result.keys(), nxcu_result.keys() - assert nxcu_nodes == nx_nodes - for node_id in nx_nodes: - nx_bc, nxcu_bc = nx_result[node_id], nxcu_result[node_id] - assert math.isclose(nx_bc, nxcu_bc, rel_tol=1e-6), \ - f"bc for {node_id=} exceeds tolerance: {nx_bc=}, {nxcu_bc=}"