-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build pip wheels alongside conda CI (#3096)
This PR adds pip wheel CI to the Conda CI, instead of having them work separately. Authors: - Sevag H (https://github.com/sevagh) - AJ Schmidt (https://github.com/ajschmidt8) - Vyas Ramasubramani (https://github.com/vyasr) - Rick Ratzel (https://github.com/rlratzel) Approvers: - AJ Schmidt (https://github.com/ajschmidt8) - Rick Ratzel (https://github.com/rlratzel) - Brad Rees (https://github.com/BradReesWork) URL: #3096
- Loading branch information
Showing
15 changed files
with
271 additions
and
117 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 |
---|---|---|
|
@@ -52,3 +52,62 @@ jobs: | |
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
wheel-build-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 }} | ||
package-name: pylibcugraph | ||
package-dir: python/pylibcugraph | ||
|
||
# Note that this approach to cloning repos obviates any modification to | ||
# the CMake variables in get_cumlprims_mg.cmake since CMake will just use | ||
# the clone as is. | ||
extra-repo: rapidsai/cugraph-ops | ||
extra-repo-sha: branch-23.02 | ||
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
|
||
skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" | ||
wheel-publish-pylibcugraph: | ||
needs: wheel-build-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 }} | ||
package-name: pylibcugraph | ||
wheel-build-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 }} | ||
package-name: cugraph | ||
package-dir: python/cugraph | ||
|
||
# Note that this approach to cloning repos obviates any modification to | ||
# the CMake variables in get_cumlprims_mg.cmake since CMake will just use | ||
# the clone as is. | ||
extra-repo: rapidsai/cugraph-ops | ||
extra-repo-sha: branch-23.02 | ||
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
|
||
skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" | ||
wheel-publish-cugraph: | ||
needs: wheel-build-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: 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 |
---|---|---|
|
@@ -18,6 +18,10 @@ jobs: | |
- conda-notebook-tests | ||
- conda-python-build | ||
- conda-python-tests | ||
- wheel-build-pylibcugraph | ||
- wheel-tests-pylibcugraph | ||
- wheel-build-cugraph | ||
- wheel-tests-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
checks: | ||
|
@@ -58,3 +62,52 @@ jobs: | |
arch: "amd64" | ||
container_image: "rapidsai/ci:latest" | ||
run_script: "ci/test_notebooks.sh" | ||
wheel-build-pylibcugraph: | ||
needs: checks | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
package-name: pylibcugraph | ||
package-dir: python/pylibcugraph | ||
extra-repo: rapidsai/cugraph-ops | ||
extra-repo-sha: branch-23.02 | ||
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" | ||
wheel-tests-pylibcugraph: | ||
needs: wheel-build-pylibcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
package-name: pylibcugraph | ||
# On arm also need to install cupy from the specific webpage. | ||
test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64" | ||
test-unittest: "RAPIDS_DATASET_ROOT_DIR=./datasets pytest -v ./python/pylibcugraph/pylibcugraph/tests" | ||
test-smoketest: "python ci/wheel_smoke_test_pylibcugraph.py" | ||
wheel-build-cugraph: | ||
needs: wheel-tests-pylibcugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
package-name: cugraph | ||
package-dir: python/cugraph | ||
extra-repo: rapidsai/cugraph-ops | ||
extra-repo-sha: branch-23.02 | ||
extra-repo-deploy-key: CUGRAPH_OPS_SSH_PRIVATE_DEPLOY_KEY | ||
before-wheel: "RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-wheelhouse" | ||
skbuild-configure-options: "-DDETECT_CONDA_ENV=OFF -DCUGRAPH_BUILD_WHEELS=ON -DFIND_CUGRAPH_CPP=OFF -DCPM_cugraph-ops_SOURCE=/project/cugraph-ops/" | ||
wheel-tests-cugraph: | ||
needs: wheel-build-cugraph | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: pull-request | ||
package-name: cugraph | ||
# Always want to test against latest dask/distributed. | ||
test-before-amd64: "cd ./datasets && bash ./get_test_data.sh && cd - && RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-pylibcugraph-dep && pip install --no-deps ./local-pylibcugraph-dep/*.whl && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/[email protected]" | ||
# On arm also need to install cupy from the specific site. | ||
test-before-arm64: "RAPIDS_PY_WHEEL_NAME=pylibcugraph_cu11 rapids-download-wheels-from-s3 ./local-pylibcugraph-dep && pip install --no-deps ./local-pylibcugraph-dep/*.whl && pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64 && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/[email protected]" | ||
test-unittest: "RAPIDS_DATASET_ROOT_DIR=/__w/cugraph/cugraph/datasets pytest -v ./python/cugraph/cugraph/tests --ignore=./python/cugraph/cugraph/tests/mg" | ||
test-smoketest: "python ci/wheel_smoke_test_cugraph.py" |
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 |
---|---|---|
|
@@ -30,3 +30,29 @@ jobs: | |
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
wheel-tests-pylibcugraph: | ||
secrets: inherit | ||
uses: rapidsai/shared-action-workflows/.github/workflows/[email protected] | ||
with: | ||
build_type: nightly | ||
branch: ${{ inputs.branch }} | ||
date: ${{ inputs.date }} | ||
sha: ${{ inputs.sha }} | ||
package-name: pylibcugraph | ||
# On arm also need to install cupy from the specific webpage. | ||
test-before-arm64: "pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64" | ||
test-unittest: "RAPIDS_DATASET_ROOT_DIR=./datasets pytest -v ./python/pylibcugraph/pylibcugraph/tests" | ||
wheel-tests-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 }} | ||
package-name: cugraph | ||
# Always want to test against latest dask/distributed. | ||
test-before-amd64: "cd ./datasets && bash ./get_test_data.sh && cd - && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/[email protected]" | ||
# On arm also need to install cupy from the specific webpage. | ||
test-before-arm64: "cd ./datasets && bash ./get_test_data.sh && cd - && pip install cupy-cuda11x -f https://pip.cupy.dev/aarch64 && pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/[email protected]" | ||
test-unittest: "RAPIDS_DATASET_ROOT_DIR=/__w/cugraph/cugraph/datasets pytest -v ./python/cugraph/cugraph/tests --ignore=./python/cugraph/cugraph/tests/mg" |
This file was deleted.
Oops, something went wrong.
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,37 @@ | ||
# 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 cudf | ||
import cugraph | ||
|
||
if __name__ == "__main__": | ||
edgelist = cudf.DataFrame({"source": ["a", "b", "c"], "destination": ["b", "c", "d"]}) | ||
|
||
# directed graph | ||
G = cugraph.Graph(directed=True) | ||
G.from_cudf_edgelist(edgelist, store_transposed=True) | ||
result_df = cugraph.pagerank(G) | ||
|
||
assert(result_df["pagerank"].sum() == 1.0) | ||
assert(result_df.sort_values(by="pagerank")["vertex"].values_host.tolist() | ||
== ["a", "b", "c", "d"]) | ||
|
||
# undirected graph | ||
G = cugraph.Graph(directed=False) | ||
G.from_cudf_edgelist(edgelist, store_transposed=True) | ||
result_df = cugraph.pagerank(G) | ||
|
||
assert(result_df["pagerank"].sum() == 1.0) | ||
result_df.set_index("vertex", inplace=True) | ||
assert(result_df.loc["a", "pagerank"] == result_df.loc["d", "pagerank"]) | ||
assert(result_df.loc["b", "pagerank"] == result_df.loc["c", "pagerank"]) |
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,54 @@ | ||
# 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 cupy | ||
from pylibcugraph import ResourceHandle, GraphProperties, SGGraph, pagerank | ||
|
||
# an import statement that reveals a problem with cusolver | ||
from pylibcugraph.components._connectivity import ( | ||
strongly_connected_components, | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
src_array = cupy.asarray([100, 201, 302], dtype="int32") | ||
dst_array = cupy.asarray([201, 302, 403], dtype="int32") | ||
wgt_array = cupy.asarray([1.0, 1.0, 1.0], dtype="float32") | ||
|
||
resource_handle = ResourceHandle() | ||
|
||
G = SGGraph(resource_handle, | ||
GraphProperties(is_symmetric=False, is_multigraph=False), | ||
src_array, | ||
dst_array, | ||
wgt_array, | ||
store_transposed=True, | ||
renumber=True, | ||
do_expensive_check=True, | ||
) | ||
|
||
(vertices, pageranks) = pagerank(resource_handle=resource_handle, | ||
graph=G, | ||
precomputed_vertex_out_weight_vertices=None, | ||
precomputed_vertex_out_weight_sums=None, | ||
initial_guess_vertices=None, | ||
initial_guess_values=None, | ||
alpha=0.85, | ||
epsilon=1.0e-6, | ||
max_iterations=500, | ||
do_expensive_check=True, | ||
) | ||
|
||
assert(pageranks.sum() == 1.0) | ||
results = dict(zip(vertices.tolist(),pageranks.tolist())) | ||
assert(results[100] < results[201] < results[302] < results[403]) |
Oops, something went wrong.