From f6fcc933264fcc97b55673e00186470923feab87 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Tue, 3 Mar 2026 15:28:40 -0600 Subject: [PATCH 1/3] wheels CI: write constraints directly to PIP_CONSTRAINT --- ci/cudf_pandas_scripts/pandas-tests/run.sh | 7 +++++++ ci/cudf_pandas_scripts/run_tests.sh | 16 +++++++++++----- ci/test_wheel_cudf.sh | 15 ++++++++++----- ci/test_wheel_cudf_polars.sh | 16 +++++++++++----- ci/test_wheel_dask_cudf.sh | 14 ++++++++++---- 5 files changed, 49 insertions(+), 19 deletions(-) diff --git a/ci/cudf_pandas_scripts/pandas-tests/run.sh b/ci/cudf_pandas_scripts/pandas-tests/run.sh index dbda96927fb..91195f92500 100755 --- a/ci/cudf_pandas_scripts/pandas-tests/run.sh +++ b/ci/cudf_pandas_scripts/pandas-tests/run.sh @@ -4,6 +4,13 @@ set -euo pipefail +# TODO(jameslamb): revert before merging +git clone --branch generate-pip-constraints \ + https://github.com/rapidsai/gha-tools.git \ + /tmp/gha-tools + +export PATH="/tmp/gha-tools/tools:${PATH}" + source rapids-init-pip EXITCODE=0 diff --git a/ci/cudf_pandas_scripts/run_tests.sh b/ci/cudf_pandas_scripts/run_tests.sh index 246754e7ce4..7a8a4bc908b 100755 --- a/ci/cudf_pandas_scripts/run_tests.sh +++ b/ci/cudf_pandas_scripts/run_tests.sh @@ -4,6 +4,13 @@ set -eoxu pipefail +# TODO(jameslamb): revert before merging +git clone --branch generate-pip-constraints \ + https://github.com/rapidsai/gha-tools.git \ + /tmp/gha-tools + +export PATH="/tmp/gha-tools/tools:${PATH}" + source rapids-init-pip RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} @@ -57,17 +64,16 @@ else PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" pylibcudf --stable --cuda "$RAPIDS_CUDA_VERSION")") # generate constraints (possibly pinning to oldest support versions of dependencies) - rapids-generate-pip-constraints test_python_cudf_pandas ./constraints.txt + rapids-generate-pip-constraints test_python_cudf_pandas "${PIP_CONSTRAINT}" # notes: # - # * echo to expand wildcard before adding `[test,cudf-pandas-tests]` requires for pip - # * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is - # ignored if any other --constraint are passed via the CLI + # * echo to expand wildcard before adding `[test]` requires for pip + # * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because + # that environment variable is ignored if any other --constraint are passed via the CLI # python -m pip install \ -v \ - --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${CUDF_WHEELHOUSE}"/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test,cudf-pandas-tests]" \ "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ diff --git a/ci/test_wheel_cudf.sh b/ci/test_wheel_cudf.sh index a890c11f88d..f3997dd8994 100755 --- a/ci/test_wheel_cudf.sh +++ b/ci/test_wheel_cudf.sh @@ -16,7 +16,7 @@ PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel rapids-logger "Install pylibcudf and its basic dependencies in a virtual environment" # generate constraints (possibly pinning to oldest support versions of dependencies) -rapids-generate-pip-constraints py_test_cudf ./constraints.txt +rapids-generate-pip-constraints py_test_cudf "${PIP_CONSTRAINT}" RESULTS_DIR=${RAPIDS_TESTS_DIR:-"$(mktemp -d)"} RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${RESULTS_DIR}/test-results"}/ @@ -25,9 +25,15 @@ mkdir -p "${RAPIDS_TESTS_DIR}" # To test pylibcudf without its optional dependencies, we create a virtual environment python -m venv env . env/bin/activate + +# notes: +# +# * echo to expand wildcard before adding `[test]` requires for pip +# * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because +# that environment variable is ignored if any other --constraint are passed via the CLI +# rapids-pip-retry install \ -v \ - --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ "$(echo "${PYLIBCUDF_WHEELHOUSE}"/pylibcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" @@ -48,12 +54,11 @@ rapids-logger "Install cudf, pylibcudf, and test requirements" # notes: # # * echo to expand wildcard before adding `[test]` requires for pip -# * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is -# ignored if any other --constraint are passed via the CLI +# * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because +# that environment variable is ignored if any other --constraint are passed via the CLI # rapids-pip-retry install \ -v \ - --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${CUDF_WHEELHOUSE}"/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" \ "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ diff --git a/ci/test_wheel_cudf_polars.sh b/ci/test_wheel_cudf_polars.sh index abdaeebd165..d6d420e0ba1 100755 --- a/ci/test_wheel_cudf_polars.sh +++ b/ci/test_wheel_cudf_polars.sh @@ -4,6 +4,13 @@ set -euo pipefail +# TODO(jameslamb): revert before merging +git clone --branch generate-pip-constraints \ + https://github.com/rapidsai/gha-tools.git \ + /tmp/gha-tools + +export PATH="/tmp/gha-tools/tools:${PATH}" + source rapids-init-pip rapids-logger "Download wheels" @@ -18,17 +25,16 @@ PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel rapids-logger "Installing cudf_polars and its dependencies" # generate constraints (possibly pinning to oldest support versions of dependencies) -rapids-generate-pip-constraints py_test_cudf_polars ./constraints.txt +rapids-generate-pip-constraints py_test_cudf_polars "${PIP_CONSTRAINT}" # notes: # -# * echo to expand wildcard before adding `[test,experimental]` requires for pip -# * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is -# ignored if any other --constraint are passed via the CLI +# * echo to expand wildcard before adding `[test]` requires for pip +# * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because +# that environment variable is ignored if any other --constraint are passed via the CLI # rapids-pip-retry install \ -v \ - --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${CUDF_POLARS_WHEELHOUSE}"/cudf_polars_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test,experimental]" \ "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ diff --git a/ci/test_wheel_dask_cudf.sh b/ci/test_wheel_dask_cudf.sh index 636ced077d7..e65c0f4576b 100755 --- a/ci/test_wheel_dask_cudf.sh +++ b/ci/test_wheel_dask_cudf.sh @@ -4,6 +4,13 @@ set -euo pipefail +# TODO(jameslamb): revert before merging +git clone --branch generate-pip-constraints \ + https://github.com/rapidsai/gha-tools.git \ + /tmp/gha-tools + +export PATH="/tmp/gha-tools/tools:${PATH}" + source rapids-init-pip RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")" @@ -17,17 +24,16 @@ PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel rapids-logger "Install dask_cudf, cudf, pylibcudf, and test requirements" # generate constraints (possibly pinning to oldest support versions of dependencies) -rapids-generate-pip-constraints py_test_dask_cudf ./constraints.txt +rapids-generate-pip-constraints py_test_dask_cudf "${PIP_CONSTRAINT}" # notes: # # * echo to expand wildcard before adding `[test]` requires for pip -# * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is -# ignored if any other --constraint are passed via the CLI +# * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because +# that environment variable is ignored if any other --constraint are passed via the CLI # rapids-pip-retry install \ -v \ - --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${CUDF_WHEELHOUSE}"/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ "$(echo "${DASK_CUDF_WHEELHOUSE}"/dask_cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test]" \ From 72e43ad3c91b2d5ba73d374dcddd8f81f571c25e Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 4 Mar 2026 09:43:37 -0600 Subject: [PATCH 2/3] cudf_pands_scripts/run_tests.sh is special, keep using a custom constraints file there --- ci/cudf_pandas_scripts/pandas-tests/run.sh | 7 ------- ci/cudf_pandas_scripts/run_tests.sh | 16 +++++----------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/ci/cudf_pandas_scripts/pandas-tests/run.sh b/ci/cudf_pandas_scripts/pandas-tests/run.sh index 91195f92500..dbda96927fb 100755 --- a/ci/cudf_pandas_scripts/pandas-tests/run.sh +++ b/ci/cudf_pandas_scripts/pandas-tests/run.sh @@ -4,13 +4,6 @@ set -euo pipefail -# TODO(jameslamb): revert before merging -git clone --branch generate-pip-constraints \ - https://github.com/rapidsai/gha-tools.git \ - /tmp/gha-tools - -export PATH="/tmp/gha-tools/tools:${PATH}" - source rapids-init-pip EXITCODE=0 diff --git a/ci/cudf_pandas_scripts/run_tests.sh b/ci/cudf_pandas_scripts/run_tests.sh index a7966f10117..0e787bc5549 100755 --- a/ci/cudf_pandas_scripts/run_tests.sh +++ b/ci/cudf_pandas_scripts/run_tests.sh @@ -4,13 +4,6 @@ set -eoxu pipefail -# TODO(jameslamb): revert before merging -git clone --branch generate-pip-constraints \ - https://github.com/rapidsai/gha-tools.git \ - /tmp/gha-tools - -export PATH="/tmp/gha-tools/tools:${PATH}" - source rapids-init-pip RAPIDS_TESTS_DIR=${RAPIDS_TESTS_DIR:-"${PWD}/test-results"} @@ -64,16 +57,17 @@ else PYLIBCUDF_WHEELHOUSE=$(rapids-download-from-github "$(rapids-package-name "wheel_python" pylibcudf --stable --cuda "$RAPIDS_CUDA_VERSION")") # generate constraints (possibly pinning to oldest support versions of dependencies) - rapids-generate-pip-constraints test_python_cudf_pandas "${PIP_CONSTRAINT}" + rapids-generate-pip-constraints test_python_cudf_pandas ./constraints.txt # notes: # - # * echo to expand wildcard before adding `[test]` requires for pip - # * just providing --constraint="${PIP_CONSTRAINT}" to be explicit, and because - # that environment variable is ignored if any other --constraint are passed via the CLI + # * echo to expand wildcard before adding `[test,cudf-pandas-tests]` requires for pip + # * need to provide --constraint="${PIP_CONSTRAINT}" because that environment variable is + # ignored if any other --constraint are passed via the CLI # python -m pip install \ -v \ + --constraint ./constraints.txt \ --constraint "${PIP_CONSTRAINT}" \ "$(echo "${CUDF_WHEELHOUSE}"/cudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)[test,cudf-pandas-tests]" \ "$(echo "${LIBCUDF_WHEELHOUSE}"/libcudf_"${RAPIDS_PY_CUDA_SUFFIX}"*.whl)" \ From 2451dc4716af0bd386839dba7269b0836848b693 Mon Sep 17 00:00:00 2001 From: James Lamb Date: Wed, 4 Mar 2026 15:02:53 -0600 Subject: [PATCH 3/3] test new behavior --- ci/test_wheel_cudf.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ci/test_wheel_cudf.sh b/ci/test_wheel_cudf.sh index f3997dd8994..2bad400ff94 100755 --- a/ci/test_wheel_cudf.sh +++ b/ci/test_wheel_cudf.sh @@ -4,6 +4,13 @@ set -euo pipefail +# TODO(jameslamb): revert before merging +git clone --branch generate-pip-constraints \ + https://github.com/rapidsai/gha-tools.git \ + /tmp/gha-tools + +export PATH="/tmp/gha-tools/tools:${PATH}" + source rapids-init-pip RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen "${RAPIDS_CUDA_VERSION}")"