Skip to content

Commit 3aeb4d8

Browse files
authored
Use rapids-pip-retry in CI jobs that might need retries (#17920)
Uses a retry wrapper for `pip` commands to try to alleviate CI failures due to hash mismatches that result from network hiccups xref rapidsai/build-planning#148 This will retry failures that show up in CI like: ``` Collecting nvidia-cublas-cu12 (from libraft-cu12==25.2.*,>=0.0.0a0) Downloading https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl (604.9 MB) ━━━━━━━━━━━━━━━━━━━━━ 350.2/604.9 MB 229.2 MB/s eta 0:00:02 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them. nvidia-cublas-cu12 from https://pypi.nvidia.com/nvidia-cublas-cu12/nvidia_cublas_cu12-12.8.3.14-py3-none-manylinux_2_27_aarch64.whl#sha256=93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3 (from libraft-cu12==25.2.*,>=0.0.0a0): Expected sha256 93a4e0e386cc7f6e56c822531396de8170ed17068a1e18f987574895044cd8c3 Got 849c88d155cb4b4a3fdfebff9270fb367c58370b4243a2bdbcb1b9e7e940b7be ``` Authors: - Gil Forsyth (https://github.com/gforsyth) Approvers: - Mike Sarahan (https://github.com/msarahan) - Bradley Dice (https://github.com/bdice) URL: #17920
1 parent aa54f5f commit 3aeb4d8

7 files changed

+10
-10
lines changed

ci/build_wheel.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
33

44
set -euo pipefail
55

@@ -16,7 +16,7 @@ cd "${package_dir}"
1616
sccache --zero-stats
1717

1818
rapids-logger "Building '${package_name}' wheel"
19-
python -m pip wheel \
19+
rapids-pip-retry wheel \
2020
-w dist \
2121
-v \
2222
--no-deps \

ci/build_wheel_libcudf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rapids-dependency-file-generator \
1818
| tee /tmp/requirements-build.txt
1919

2020
rapids-logger "Installing build requirements"
21-
python -m pip install \
21+
rapids-pip-retry install \
2222
-v \
2323
--prefer-binary \
2424
-r /tmp/requirements-build.txt

ci/configure_cpp_static.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2024, NVIDIA CORPORATION.
2+
# Copyright (c) 2024-2025, NVIDIA CORPORATION.
33

44
set -euo pipefail
55

@@ -15,7 +15,7 @@ rapids-dependency-file-generator \
1515
--file-key test_static_build \
1616
--matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch)" | tee "${REQUIREMENTS_FILE}"
1717

18-
python -m pip install -r "${REQUIREMENTS_FILE}"
18+
rapids-pip-retry install -r "${REQUIREMENTS_FILE}"
1919
pyenv rehash
2020

2121
cmake -S cpp -B build_static -GNinja -DBUILD_SHARED_LIBS=OFF -DCUDF_USE_ARROW_STATIC=ON -DBUILD_TESTS=OFF

ci/test_cudf_polars_polars_tests.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ RAPIDS_PY_WHEEL_NAME="libcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-f
1313
RAPIDS_PY_WHEEL_NAME="pylibcudf_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-s3 python ./local-pylibcudf-dep
1414

1515
rapids-logger "Install libcudf, pylibcudf and cudf_polars"
16-
python -m pip install \
16+
rapids-pip-retry install \
1717
-v \
1818
"$(echo ./dist/cudf_polars_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" \
1919
"$(echo ./local-libcudf-dep/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \
@@ -26,7 +26,7 @@ git clone https://github.com/pola-rs/polars.git --branch "${TAG}" --depth 1
2626

2727
# Install requirements for running polars tests
2828
rapids-logger "Install polars test requirements"
29-
python -m pip install -r polars/py-polars/requirements-dev.txt -r polars/py-polars/requirements-ci.txt
29+
rapids-pip-retry install -r polars/py-polars/requirements-dev.txt -r polars/py-polars/requirements-ci.txt
3030

3131
# shellcheck disable=SC2317
3232
function set_exitcode()

ci/test_wheel_cudf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ rapids-logger "Install cudf, pylibcudf, and test requirements"
1616
rapids-generate-pip-constraints py_test_cudf ./constraints.txt
1717

1818
# echo to expand wildcard before adding `[extra]` requires for pip
19-
python -m pip install \
19+
rapids-pip-retry install \
2020
-v \
2121
--constraint ./constraints.txt \
2222
"$(echo ./dist/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" \

ci/test_wheel_cudf_polars.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rapids-logger "Installing cudf_polars and its dependencies"
1818
rapids-generate-pip-constraints py_test_cudf_polars ./constraints.txt
1919

2020
# echo to expand wildcard before adding `[test,experimental]` requires for pip
21-
python -m pip install \
21+
rapids-pip-retry install \
2222
-v \
2323
--constraint ./constraints.txt \
2424
"$(echo ./dist/cudf_polars_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test,experimental]" \

ci/test_wheel_dask_cudf.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ rapids-logger "Install dask_cudf, cudf, pylibcudf, and test requirements"
1717
rapids-generate-pip-constraints py_test_dask_cudf ./constraints.txt
1818

1919
# echo to expand wildcard before adding `[extra]` requires for pip
20-
python -m pip install \
20+
rapids-pip-retry install \
2121
-v \
2222
--constraint ./constraints.txt \
2323
"$(echo ./dist/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \

0 commit comments

Comments
 (0)