From 1663ec7333366fb17c0a787e99df68d06e1a61a6 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 25 Nov 2024 15:38:27 -0600 Subject: [PATCH 1/3] Shrink wheel size limit following removal of vector search APIs. --- python/pylibraft/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/pylibraft/pyproject.toml b/python/pylibraft/pyproject.toml index 3502d82fd4..5fa86b803b 100644 --- a/python/pylibraft/pyproject.toml +++ b/python/pylibraft/pyproject.toml @@ -136,7 +136,7 @@ select = [ ] # detect when package size grows significantly -max_allowed_size_compressed = '825M' +max_allowed_size_compressed = '600M' [tool.pytest.ini_options] filterwarnings = [ From cc8aad278ddb373c6c1e55309633a93cdcebbd31 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Mon, 25 Nov 2024 15:44:48 -0600 Subject: [PATCH 2/3] Apply tighter limit to pylibraft wheels for CUDA 12. --- ci/validate_wheel.sh | 14 ++++++++++++++ python/pylibraft/pyproject.toml | 4 +--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ci/validate_wheel.sh b/ci/validate_wheel.sh index 5910a5c59f..c30aff5dd0 100755 --- a/ci/validate_wheel.sh +++ b/ci/validate_wheel.sh @@ -6,12 +6,26 @@ set -euo pipefail package_dir=$1 wheel_dir_relative_path=$2 +RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" + +# some packages are much larger on CUDA 11 than on CUDA 12 +if [[ "${RAPIDS_CUDA_MAJOR}" == "11" ]]; then + PYDISTCHECK_ARGS=( + --max-allowed-size-compressed '600M' + ) +else + PYDISTCHECK_ARGS=( + --max-allowed-size-compressed '100M' + ) +fi + cd "${package_dir}" rapids-logger "validate packages with 'pydistcheck'" pydistcheck \ --inspect \ + "${PYDISTCHECK_ARGS[@]}" \ "$(echo ${wheel_dir_relative_path}/*.whl)" rapids-logger "validate packages with 'twine'" diff --git a/python/pylibraft/pyproject.toml b/python/pylibraft/pyproject.toml index 5fa86b803b..ba454af591 100644 --- a/python/pylibraft/pyproject.toml +++ b/python/pylibraft/pyproject.toml @@ -132,12 +132,10 @@ matrix-entry = "cuda_suffixed=true;use_cuda_wheels=true" [tool.pydistcheck] select = [ + # NOTE: size threshold is managed via CLI args in CI scripts "distro-too-large-compressed", ] -# detect when package size grows significantly -max_allowed_size_compressed = '600M' - [tool.pytest.ini_options] filterwarnings = [ "error", From 0e529be4e5e9405fbb5f4fb2a3c43790df16f4b4 Mon Sep 17 00:00:00 2001 From: Bradley Dice Date: Tue, 26 Nov 2024 11:23:54 -0600 Subject: [PATCH 3/3] Use different limits for pylibraft and raft-dask. --- ci/build_wheel_pylibraft.sh | 2 +- ci/build_wheel_raft_dask.sh | 2 +- ci/validate_wheel.sh | 20 +++++++++++++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/ci/build_wheel_pylibraft.sh b/ci/build_wheel_pylibraft.sh index dacaa1190e..dd62ab5399 100755 --- a/ci/build_wheel_pylibraft.sh +++ b/ci/build_wheel_pylibraft.sh @@ -18,4 +18,4 @@ esac export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF${EXTRA_CMAKE_ARGS}" ci/build_wheel.sh pylibraft ${package_dir} -ci/validate_wheel.sh ${package_dir} final_dist +ci/validate_wheel.sh ${package_dir} final_dist pylibraft diff --git a/ci/build_wheel_raft_dask.sh b/ci/build_wheel_raft_dask.sh index e4f3f0a833..d49d131abf 100755 --- a/ci/build_wheel_raft_dask.sh +++ b/ci/build_wheel_raft_dask.sh @@ -9,4 +9,4 @@ package_dir="python/raft-dask" export SKBUILD_CMAKE_ARGS="-DDETECT_CONDA_ENV=OFF;-DFIND_RAFT_CPP=OFF" ci/build_wheel.sh raft-dask ${package_dir} -ci/validate_wheel.sh ${package_dir} final_dist +ci/validate_wheel.sh ${package_dir} final_dist raft-dask diff --git a/ci/validate_wheel.sh b/ci/validate_wheel.sh index c30aff5dd0..5ef72ad895 100755 --- a/ci/validate_wheel.sh +++ b/ci/validate_wheel.sh @@ -5,18 +5,28 @@ set -euo pipefail package_dir=$1 wheel_dir_relative_path=$2 +package_name=$3 RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" # some packages are much larger on CUDA 11 than on CUDA 12 -if [[ "${RAPIDS_CUDA_MAJOR}" == "11" ]]; then +if [[ "${package_name}" == "raft-dask" ]]; then PYDISTCHECK_ARGS=( - --max-allowed-size-compressed '600M' + --max-allowed-size-compressed '200M' ) +elif [[ "${package_name}" == "pylibraft" ]]; then + if [[ "${RAPIDS_CUDA_MAJOR}" == "11" ]]; then + PYDISTCHECK_ARGS=( + --max-allowed-size-compressed '600M' + ) + else + PYDISTCHECK_ARGS=( + --max-allowed-size-compressed '100M' + ) + fi else - PYDISTCHECK_ARGS=( - --max-allowed-size-compressed '100M' - ) + echo "Unsupported package name: ${package_name}" + exit 1 fi cd "${package_dir}"