Skip to content

Commit 0ac70df

Browse files
authored
build pure-Python wheels without waiting for dependencies (#409)
Looking closely at the CI dependency graphs while working on #122, I noticed some opportunities to improve the end-to-end time for PR CI and nightly builds. `wheel-build-{libB}` jobs only need to wait for `wheel-build-{libA}` jobs to complete if **building** `libB` wheels requires `libA`. This updates job dependencies here to follow that rule. * `wheel-build-cuopt-server`: start building immediately * `wheel-build-cuopt-sh-client`: start building immediately * `build-images`: adds `wheel-build-cupot-sh-client` to jobs this needs to wait for (branch / nightly builds only) - https://github.com/NVIDIA/cuopt/blob/933d810e517567f4b5cb3cd507b350eb30457a70/ci/docker/Dockerfile#L65 This PR also remove some unnecessary builds. This project is currently running 16 `wheel-build-cuopt-server` jobs (2 CUDA major x 2 CPU architectures x 4 Python versions) when it only needs 2 (1 per CUDA major version), because it publishes `py3-none-any` wheels (https://pypi.anaconda.org/rapidsai-wheels-nightly/simple/cuopt-server-cu13). * removes duplicate `cuopt-server` builds * fixes artifact downloads of `cuopt-sh-client` in nightly tests ## Issue Noticed while working towards #122 ## Notes for Reviewers ### Benefits of these changes Reduced end-to-end time for PR builds and probably for branch/nightly builds. Reduced risk of failed or incorrect container-image builds resulting from `build-images` starting before there are `cuopt-sh-client` packages available. 14 fewer `wheel-build-cuopt-server` jobs per PR 😁 # Authors: - James Lamb (https://github.com/jameslamb) Approvers: - Ramakrishnap (https://github.com/rgsl888prabhu) URL: #409
1 parent 67d5151 commit 0ac70df

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ jobs:
148148
package-name: cuopt
149149
package-type: python
150150
wheel-build-cuopt-server:
151-
needs: wheel-build-cuopt
152151
secrets: inherit
153152
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.10
154153
with:
@@ -159,6 +158,9 @@ jobs:
159158
script: ci/build_wheel_cuopt_server.sh
160159
package-name: cuopt_server
161160
package-type: python
161+
pure-wheel: true
162+
# Only need 1 package per CUDA major version. This selects "ARCH=amd64 + the latest supported Python, 1 job per major CUDA version".
163+
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
162164
wheel-publish-cuopt-server:
163165
needs: wheel-build-cuopt-server
164166
secrets: inherit
@@ -186,7 +188,6 @@ jobs:
186188
container_image: "rapidsai/ci-conda:25.10-latest"
187189
script: "ci/build_docs.sh"
188190
wheel-build-cuopt-sh-client:
189-
needs: wheel-build-cuopt
190191
secrets: inherit
191192
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.10
192193
with:
@@ -198,6 +199,7 @@ jobs:
198199
package-name: cuopt_sh_client
199200
package-type: python
200201
append-cuda-suffix: false
202+
pure-wheel: true
201203
# only need 1 build (noarch package): this selects amd64, oldest-supported Python, latest-supported CUDA
202204
matrix_filter: '[map(select(.ARCH == "amd64")) | min_by((.PY_VER | split(".") | map(tonumber)), (.CUDA_VER | split(".") | map(-tonumber)))]'
203205
wheel-publish-cuopt-sh-client:
@@ -212,7 +214,10 @@ jobs:
212214
package-name: cuopt_sh_client
213215
package-type: python
214216
build-images:
215-
needs: [wheel-publish-cuopt, wheel-publish-cuopt-server]
217+
needs:
218+
- wheel-publish-cuopt
219+
- wheel-publish-cuopt-server
220+
- wheel-publish-cuopt-sh-client
216221
uses: ./.github/workflows/build_test_publish_images.yaml
217222
secrets: inherit
218223
with:

.github/workflows/pr.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,17 @@ jobs:
198198
build_type: pull-request
199199
script: ci/test_wheel_cuopt.sh
200200
wheel-build-cuopt-server:
201-
needs: wheel-build-cuopt
201+
needs: checks
202202
secrets: inherit
203203
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.10
204204
with:
205205
build_type: pull-request
206206
script: ci/build_wheel_cuopt_server.sh
207207
package-name: cuopt_server
208208
package-type: python
209+
pure-wheel: true
210+
# Only need 1 package per CUDA major version. This selects "ARCH=amd64 + the latest supported Python, 1 job per major CUDA version".
211+
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))]))
209212
wheel-build-cuopt-sh-client:
210213
secrets: inherit
211214
uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.10
@@ -219,15 +222,15 @@ jobs:
219222
# only need 1 build (noarch package): this selects amd64, oldest-supported Python, latest-supported CUDA
220223
matrix_filter: '[map(select(.ARCH == "amd64")) | min_by((.PY_VER | split(".") | map(tonumber)), (.CUDA_VER | split(".") | map(-tonumber)))]'
221224
wheel-tests-cuopt-server:
222-
needs: [wheel-build-cuopt-server, changed-files]
225+
needs: [wheel-build-cuopt, wheel-build-cuopt-server, changed-files]
223226
secrets: inherit
224227
uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.10
225228
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python_cuopt_server
226229
with:
227230
build_type: pull-request
228231
script: ci/test_wheel_cuopt_server.sh
229232
test-self-hosted-server:
230-
needs: [wheel-build-cuopt-server, changed-files]
233+
needs: [wheel-build-cuopt, wheel-build-cuopt-server, changed-files]
231234
secrets: inherit
232235
uses: ./.github/workflows/self_hosted_service_test.yaml
233236
#if: fromJSON(needs.changed-files.outputs.changed_file_groups).test_python

ci/test_self_hosted_service.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ source rapids-init-pip
2222
# Download the cuopt built in the previous step
2323
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
2424
CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
25-
CUOPT_SERVER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
25+
CUOPT_SERVER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)
2626
CUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
2727
LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
2828

ci/test_wheel_cuopt_server.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ source rapids-init-pip
2222
# Download the packages built in the previous step
2323
RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"
2424
CUOPT_MPS_PARSER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_mps_parser" rapids-download-wheels-from-github python)
25-
CUOPT_SERVER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
25+
CUOPT_SERVER_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_server_${RAPIDS_PY_CUDA_SUFFIX}" RAPIDS_PY_WHEEL_PURE="1" rapids-download-wheels-from-github python)
2626
CUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="cuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github python)
2727
LIBCUOPT_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuopt_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
2828

0 commit comments

Comments
 (0)