From 8ce71f38db4ddb9409fc9930db5ae04b43748665 Mon Sep 17 00:00:00 2001 From: Mike Sarahan Date: Fri, 7 Feb 2025 11:24:37 -0600 Subject: [PATCH 1/5] add telemetry (#822) Enables telemetry during cucim CI runs. This is done by parsing GitHub Actions run log metadata and should have no impact on build or test times. xref https://github.com/rapidsai/build-infra/issues/139 Authors: - Mike Sarahan (https://github.com/msarahan) Approvers: - Gil Forsyth (https://github.com/gforsyth) URL: https://github.com/rapidsai/cucim/pull/822 --- .github/workflows/pr.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 35836dce..f55eb225 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -19,11 +19,26 @@ jobs: - docs-build - wheel-build - wheel-tests + - telemetry-setup secrets: inherit uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@nvks-runners + telemetry-setup: + runs-on: ubuntu-latest + continue-on-error: true + env: + OTEL_SERVICE_NAME: "pr-cucim" + steps: + - name: Telemetry setup + # This gate is here and not at the job level because we need the job to not be skipped, + # since other jobs depend on it. + if: ${{ vars.TELEMETRY_ENABLED == 'true' }} + uses: rapidsai/shared-actions/telemetry-dispatch-stash-base-env-vars@main checks: secrets: inherit + needs: telemetry-setup uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@nvks-runners + with: + ignored_pr_jobs: telemetry-summarize conda-cpp-build: needs: checks secrets: inherit @@ -66,3 +81,13 @@ jobs: with: build_type: pull-request script: ci/test_wheel.sh + + telemetry-summarize: + # This job must use a self-hosted runner to record telemetry traces. + runs-on: linux-amd64-cpu4 + needs: pr-builder + if: ${{ vars.TELEMETRY_ENABLED == 'true' && !cancelled() }} + continue-on-error: true + steps: + - name: Telemetry summarize + uses: rapidsai/shared-actions/telemetry-dispatch-summarize@main From de937c0b34233ef736d1364c22199ad70cbc00b6 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Fri, 7 Feb 2025 14:21:06 -0800 Subject: [PATCH 2/5] Use shared-workflows branch-25.04 (#826) This completes the migration to NVKS runners now that all libraries have been tested and https://github.com/rapidsai/shared-workflows/pull/273 has been merged. xref: https://github.com/rapidsai/build-infra/issues/184 Authors: - Bradley Dice (https://github.com/bdice) - James Lamb (https://github.com/jameslamb) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/cucim/pull/826 --- .github/workflows/build.yaml | 12 ++++++------ .github/workflows/pr.yaml | 16 ++++++++-------- .github/workflows/test.yaml | 4 ++-- .../workflows/trigger-breaking-change-alert.yaml | 2 +- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4ac5c98b..06abfcce 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -38,7 +38,7 @@ jobs: if: github.ref_type == 'branch' needs: [python-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -51,7 +51,7 @@ jobs: python-build: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -60,7 +60,7 @@ jobs: upload-conda: needs: [cpp-build, python-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-25.04 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -68,7 +68,7 @@ jobs: sha: ${{ inputs.sha }} wheel-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -78,7 +78,7 @@ jobs: wheel-publish: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-25.04 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index f55eb225..e8c9efc9 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -21,7 +21,7 @@ jobs: - wheel-tests - telemetry-setup secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-25.04 telemetry-setup: runs-on: ubuntu-latest continue-on-error: true @@ -36,31 +36,31 @@ jobs: checks: secrets: inherit needs: telemetry-setup - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-25.04 with: ignored_pr_jobs: telemetry-summarize conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-25.04 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-25.04 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04 with: build_type: pull-request docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-25.04 with: build_type: pull-request node_type: "gpu-l4-latest-1" @@ -70,14 +70,14 @@ jobs: wheel-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-25.04 with: build_type: pull-request script: ci/build_wheel.sh wheel-tests: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.04 with: build_type: pull-request script: ci/test_wheel.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index cb91f4fe..a96bf529 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-python-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-25.04 with: build_type: nightly branch: ${{ inputs.branch }} @@ -24,7 +24,7 @@ jobs: sha: ${{ inputs.sha }} wheel-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-25.04 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/.github/workflows/trigger-breaking-change-alert.yaml b/.github/workflows/trigger-breaking-change-alert.yaml index 7b5b4810..9764c62c 100644 --- a/.github/workflows/trigger-breaking-change-alert.yaml +++ b/.github/workflows/trigger-breaking-change-alert.yaml @@ -12,7 +12,7 @@ jobs: trigger-notifier: if: contains(github.event.pull_request.labels.*.name, 'breaking') secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@nvks-runners + uses: rapidsai/shared-workflows/.github/workflows/breaking-change-alert.yaml@branch-25.04 with: sender_login: ${{ github.event.sender.login }} sender_avatar: ${{ github.event.sender.avatar_url }} From ae7f90e700837c2d46c2457bf0fe47624b7b404e Mon Sep 17 00:00:00 2001 From: Jake Awe Date: Thu, 13 Feb 2025 09:40:37 -0600 Subject: [PATCH 3/5] Update Changelog [skip ci] --- CHANGELOG.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 370881f0..f9a9166b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,24 @@ +# cucim 25.02.00 (13 Feb 2025) + +## 🐛 Bug Fixes + +- Fix primitives benchmark code ([#812](https://github.com/rapidsai/cucim/pull/812)) [@gigony](https://github.com/gigony) +- CuPy 14.0 compatibility ([#808](https://github.com/rapidsai/cucim/pull/808)) [@grlee77](https://github.com/grlee77) + +## 🛠️ Improvements + +- Use `rapids-pip-retry` in CI jobs that might need retries ([#824](https://github.com/rapidsai/cucim/pull/824)) [@gforsyth](https://github.com/gforsyth) +- Revert CUDA 12.8 shared workflow branch changes ([#818](https://github.com/rapidsai/cucim/pull/818)) [@vyasr](https://github.com/vyasr) +- Build and test with CUDA 12.8.0 ([#815](https://github.com/rapidsai/cucim/pull/815)) [@bdice](https://github.com/bdice) +- Add shellcheck to pre-commit and fix warnings ([#814](https://github.com/rapidsai/cucim/pull/814)) [@gforsyth](https://github.com/gforsyth) +- Update vendored ndimage code with axes support ([#813](https://github.com/rapidsai/cucim/pull/813)) [@grlee77](https://github.com/grlee77) +- Use GCC 13 in CUDA 12 conda builds. ([#811](https://github.com/rapidsai/cucim/pull/811)) [@bdice](https://github.com/bdice) +- Improve performance of color distance calculations by kernel fusion ([#809](https://github.com/rapidsai/cucim/pull/809)) [@grlee77](https://github.com/grlee77) +- Incorporate upstream changes from scikit-image 0.25 ([#806](https://github.com/rapidsai/cucim/pull/806)) [@grlee77](https://github.com/grlee77) +- Update version references in workflow ([#803](https://github.com/rapidsai/cucim/pull/803)) [@AyodeAwe](https://github.com/AyodeAwe) +- Require approval to run CI on draft PRs ([#798](https://github.com/rapidsai/cucim/pull/798)) [@bdice](https://github.com/bdice) +- Add breaking change workflow trigger ([#795](https://github.com/rapidsai/cucim/pull/795)) [@AyodeAwe](https://github.com/AyodeAwe) + # cucim 24.12.00 (11 Dec 2024) ## 🚨 Breaking Changes From abb90be68c99aada8c60967ebe5d0026625126fd Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Thu, 13 Feb 2025 11:53:24 -0500 Subject: [PATCH 4/5] Create Conda CI test env in one step (#833) Issue: https://github.com/rapidsai/build-planning/issues/22 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/cucim/pull/833 --- ci/release/update-version.sh | 12 ++++++++++++ ci/test_python.sh | 21 ++++++++------------- dependencies.yaml | 12 ++++++++++++ 3 files changed, 32 insertions(+), 13 deletions(-) diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index fd0e47be..a8802866 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -21,6 +21,7 @@ CURRENT_LONG_TAG=${CURRENT_MAJOR}.${CURRENT_MINOR}.${CURRENT_PATCH} NEXT_MAJOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[1]}') NEXT_MINOR=$(echo "$NEXT_FULL_TAG" | awk '{split($0, a, "."); print a[2]}') NEXT_SHORT_TAG=${NEXT_MAJOR}.${NEXT_MINOR} +NEXT_SHORT_TAG_PEP440=$(python -c "from packaging.version import Version; print(Version('${NEXT_SHORT_TAG}'))") echo "Preparing release $CURRENT_TAG => $NEXT_FULL_TAG" @@ -37,3 +38,14 @@ sed_runner "s#cucim.kit.cuslide@${CURRENT_LONG_TAG}.so#cucim.kit.cuslide@${NEXT_ for FILE in .github/workflows/*.yaml; do sed_runner "/shared-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}" done + +DEPENDENCIES=( + cucim + libcucim +) +for DEP in "${DEPENDENCIES[@]}"; do + for FILE in dependencies.yaml conda/environments/*.yaml; do + sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" + done + sed_runner "/\"${DEP}==/ s/==.*\"/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0\"/g" pyproject.toml +done diff --git a/ci/test_python.sh b/ci/test_python.sh index ae14da4a..83b092af 100755 --- a/ci/test_python.sh +++ b/ci/test_python.sh @@ -5,15 +5,20 @@ set -euo pipefail -RAPIDS_VERSION_NUMBER=$(rapids-generate-version) - . /opt/conda/etc/profile.d/conda.sh +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + rapids-logger "Generate Python testing dependencies" rapids-dependency-file-generator \ --output conda \ --file-key test_python \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${CPP_CHANNEL}" \ + --prepend-channel "${PYTHON_CHANNEL}" \ + | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n test @@ -22,22 +27,12 @@ set +u conda activate test set -u -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} RAPIDS_COVERAGE_DIR=${RAPIDS_COVERAGE_DIR:-"${PWD}/coverage-results"} mkdir -p "${RAPIDS_TESTS_DIR}" "${RAPIDS_COVERAGE_DIR}" rapids-print-env -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - --channel "${PYTHON_CHANNEL}" \ - "libcucim=${RAPIDS_VERSION_NUMBER}" \ - "cucim=${RAPIDS_VERSION_NUMBER}" - rapids-logger "Check GPU usage" nvidia-smi diff --git a/dependencies.yaml b/dependencies.yaml index 7ed0cedd..814a8abd 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -20,6 +20,8 @@ files: - cuda_version - py_version - test_python + - depends_on_cucim + - depends_on_libcucim checks: output: none includes: @@ -220,6 +222,16 @@ dependencies: cuda: "12.*" packages: - libcufile-dev + depends_on_cucim: + common: + - output_types: conda + packages: + - cucim==25.4.*,>=0.0.0a0 + depends_on_libcucim: + common: + - output_types: conda + packages: + - libcucim==25.4.*,>=0.0.0a0 develop: common: - output_types: [conda, requirements, pyproject] From 74b06d0b9e9d6e3b6b12056690d00679b502dee0 Mon Sep 17 00:00:00 2001 From: Kyle Edwards Date: Fri, 14 Feb 2025 15:51:00 -0500 Subject: [PATCH 5/5] Consolidate more Conda solves in CI (#835) Issue: https://github.com/rapidsai/build-planning/issues/22 Authors: - Kyle Edwards (https://github.com/KyleFromNVIDIA) Approvers: - James Lamb (https://github.com/jameslamb) URL: https://github.com/rapidsai/cucim/pull/835 --- ci/build_docs.sh | 21 ++++++++------------- dependencies.yaml | 2 ++ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 915fbfe7..cad5b432 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -2,31 +2,26 @@ set -euo pipefail +rapids-logger "Downloading artifacts from previous jobs" +CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) + rapids-logger "Create test conda environment" . /opt/conda/etc/profile.d/conda.sh -RAPIDS_VERSION="$(rapids-version)" - rapids-dependency-file-generator \ --output conda \ --file-key docs \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee env.yaml + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ + --prepend-channel "${CPP_CHANNEL}" \ + --prepend-channel "${PYTHON_CHANNEL}" \ + | tee env.yaml rapids-mamba-retry env create --yes -f env.yaml -n docs conda activate docs rapids-print-env -rapids-logger "Downloading artifacts from previous jobs" -CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) -PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) - -rapids-mamba-retry install \ - --channel "${CPP_CHANNEL}" \ - --channel "${PYTHON_CHANNEL}" \ - "cucim=${RAPIDS_VERSION}" \ - "libcucim=${RAPIDS_VERSION}" - RAPIDS_DOCS_DIR="$(mktemp -d)" export RAPIDS_DOCS_DIR diff --git a/dependencies.yaml b/dependencies.yaml index 814a8abd..56add54d 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -33,6 +33,8 @@ files: - cuda_version - docs - py_version + - depends_on_cucim + - depends_on_libcucim py_build_cucim: output: pyproject pyproject_dir: python/cucim