-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates to build and test nx-cugraph
wheel as part of CI and nightly workflows
#3852
Changes from all commits
985e921
9ba4595
d63eb6e
89e9dc9
f3ffacc
64a3d8c
b3c595f
e473c5b
e67a3ee
de14d8d
9412d20
52ffb67
f79f231
0fbddeb
a1d079d
b3faa5d
0e9c754
e084d5d
a662ec7
8d7546e
5adefe8
9f81547
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
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 |
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 |
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 |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -11,12 +11,4 @@ python -m pip install --no-deps ./local-pylibcugraph-dep/pylibcugraph*.whl | |||
# Always install latest dask for testing | ||||
python -m pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main | ||||
|
||||
# Only download test data for x86 | ||||
arch=$(uname -m) | ||||
if [[ "${arch}" == "x86_64" ]]; then | ||||
pushd ./datasets | ||||
bash ./get_test_data.sh | ||||
popd | ||||
fi | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess this change is necessary for nightlies? Were nightly tests for arm not running the tests that required datasets? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We shouldn't remove this, but might need to modify it to only be skipped in ARM PR jobs. In ARM PR jobs, we can only run "smoke tests" due to limited resource capacity. Line 16 in 5c34d3d
Downloading the datasets is time-intensive and should not be performed for "smoke tests" in ARM PR jobs because it wastes a lot of time on the ARM GPU node. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm terribly sorry. I read this backwards. This removed downloading datasets for ALL jobs (all arches, nightly/PR). Are we not dependent on datasets for tests to pass anymore? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The I only removed it here since it was in the proximity of the changes for the wheel builds, but I think an audit of what runs require downloading the supplemental datasets would be good for a separate PR. Prior to the recent commits to the PR which triggered CI running now, we had everything passing with the download step removed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @rlratzel, I'll approve now. |
||||
|
||||
./ci/test_wheel.sh cugraph python/cugraph |
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 |
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=}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a case where the wildcard did not match the .whl files on disk and 'echo' simply echo'd the wildcard pattern, which made
pip
generate a misleading error message. Using 'ls' will result in the script erroring out with a clear message about the missing/mis-named files.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Odd, but I'm fine with the change if it works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with this change, I see the problem with shell wildcard expansion.