-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3888 from rapidsai/branch-23.10
Forward-merge branch-23.10 to branch-23.12
- Loading branch information
Showing
9 changed files
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,3 +112,23 @@ jobs: | |
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: cugraph | ||
wheel-build-nx-cugraph: | ||
needs: wheel-publish-pylibcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
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-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: ${{ inputs.build_type || 'branch' }} | ||
branch: ${{ inputs.branch }} | ||
sha: ${{ inputs.sha }} | ||
date: ${{ inputs.date }} | ||
package-name: nx-cugraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,8 @@ jobs: | |
- wheel-tests-pylibcugraph | ||
- wheel-build-cugraph | ||
- wheel-tests-cugraph | ||
- wheel-build-nx-cugraph | ||
- wheel-tests-nx-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
checks: | ||
|
@@ -109,3 +111,17 @@ 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-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/build_wheel_nx-cugraph.sh | ||
wheel-tests-nx-cugraph: | ||
needs: wheel-build-nx-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
script: ci/test_wheel_nx-cugraph.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,3 +48,12 @@ jobs: | |
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
script: ci/test_wheel_cugraph.sh | ||
wheel-tests-nx-cugraph: | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: nightly | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
script: ci/test_wheel_nx-cugraph.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
|
||
set -euo pipefail | ||
|
||
./ci/build_wheel.sh nx-cugraph python/nx-cugraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2023, NVIDIA CORPORATION. | ||
|
||
set -eoxu pipefail | ||
|
||
./ci/test_wheel.sh nx-cugraph python/nx-cugraph |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# 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=}" |