-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
I recently noticed warnings like this in some wheel-based CI jobs:
DEPRECATION: Setting PIP_CONSTRAINT will not affect build constraints in the future, pip 26.2 will enforce this behaviour change. A possible replacement is to specify build constraints using --build-constraint or PIP_BUILD_CONSTRAINT. To disable this warning without any build constraints set --use-feature=build-constraint or PIP_USE_FEATURE="build-constraint".
(example from rapidsai/cugraph)
Looks like that was introduced in pip around 5 months ago: pypa/pip#13534
When pip starts to enforce that, it'll cause issues for RAPIDS CI. We explicitly rely on PIP_CONSTRAINT to influence the isolated build environment, to ensure that downloaded CI artifacts are used. Like this:
# Download the libcuml wheel built in the previous step and make it
# available for pip to find.
#
# Using env variable PIP_CONSTRAINT (initialized by 'rapids-init-pip') is necessary to ensure the constraints
# are used when creating the isolated build environment.
LIBCUML_WHEELHOUSE=$(RAPIDS_PY_WHEEL_NAME="libcuml_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-from-github cpp)
echo "libcuml-${RAPIDS_PY_CUDA_SUFFIX} @ file://$(echo "${LIBCUML_WHEELHOUSE}"/libcuml_*.whl)" >> "${PIP_CONSTRAINT}"
./ci/build_wheel.sh "${package_name}" "${package_dir}"(rapidsai/cuml - ci/build_wheel_cuml.sh)
We'll need to react to this to avoid CI being broken by newer versions of pip.
Benefits of this work
- keeps wheels CI working
Acceptance Criteria
- RAPIDS wheels CI works in a way that we're confident will not be broken when this deprecation is enforced
Approach
It looks like it should be possible to fix this in a way that's backwards-compatible with older pip versions, so we shouldn't need to worry too much about the specific version of pip in CI environments.
In rapids-init-pip (code link):
- set environment variable
PIP_BUILD_CONSTRAINTto point at the same file asPIP_CONSTRAINT - disable the warning with
PIP_USE_FEATURE="build-constraint"
And then we should check for any other uses of PIP_CONSTRAINT in RAPIDS code (GitHub search):
- references to
PIP_CONSTRAINTshould be updated where appropriate to includePIP_BUILD_CONSTRAINT - any other uses of that environment variable outside of
rapids-init-pipshould be adjusted accordingly
Task Tracking
Library repo updates
- cudf (wheel builds: react to changes in pip's handling of build constraints cudf#21048)
- cugraph (wheel builds: react to changes in pip's handling of build constraints cugraph#5399)
- cugraph-gnn (wheel builds: react to changes in pip's handling of build constraints cugraph-gnn#386)
- cuml (wheel builds: react to changes in pip's handling of build constraints cuml#7693)
- cuopt (wheel builds: react to changes in pip's handling of build constraints NVIDIA/cuopt#785)
- cuvs (wheel builds: react to changes in pip's handling of build constraints cuvs#1710)
- cuxfilter (wheel builds: react to changes in pip's handling of build constraints cuxfilter#757)
- dask-cuda (wheel builds: react to changes in pip's handling of build constraints dask-cuda#1606)
- kvikio (wheel builds: react to changes in pip's handling of build constraints kvikio#902)
- nx-cugraph (wheel builds: react to changes in pip's handling of build constraints nx-cugraph#230)
- rmm (wheel builds: react to changes in pip's handling of build constraints rmm#2212)
- ucxx (wheel builds: react to changes in pip's handling of build constraints ucxx#567)
- raft (wheel builds: react to changes in pip's handling of build constraints raft#2927)
- rapidsmpf (wheel builds: react to changes in pip's handling of build constraints rapidsmpf#790)
- rapids-logger (wheel builds: react to changes in pip's handling of build constraints rapids-logger#63)
- (private repos)
Other tasks
- ensure
pip>=25.3is used in wheel-building CI (ci-wheel: set pip floor to 25.3 ci-imgs#347)
Notes
N/A