diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cfdcce037..5bf5f5ac36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,7 +60,7 @@ repos: pass_filenames: false language: python - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.8.0 + rev: v1.13.11 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/build.sh b/build.sh index a76203a6db..970949e565 100755 --- a/build.sh +++ b/build.sh @@ -294,7 +294,7 @@ if (! hasArg --configure-only) && (completeBuild || hasArg cuml || hasArg pydocs fi SKBUILD_CMAKE_ARGS="-DCMAKE_MESSAGE_LOG_LEVEL=${CMAKE_LOG_LEVEL};${SKBUILD_EXTRA_CMAKE_ARGS}" \ - python -m pip install --no-build-isolation --no-deps ${REPODIR}/python + python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true ${REPODIR}/python if hasArg pydocs; then cd ${REPODIR}/docs @@ -304,5 +304,5 @@ fi if hasArg cuml-cpu; then SKBUILD_CMAKE_ARGS="-DCUML_CPU=ON;-DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE" \ - python -m pip install --no-build-isolation --no-deps -v ${REPODIR}/python + python -m pip install --no-build-isolation --no-deps --config-settings rapidsai.disable-cuda=true ${REPODIR}/python fi diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index eac581ccef..48f4f444b2 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -13,10 +13,8 @@ export CMAKE_GENERATOR=Ninja rapids-print-env -version=$(rapids-generate-version) - rapids-logger "Begin cpp build" -RAPIDS_PACKAGE_VERSION=${version} rapids-conda-retry mambabuild conda/recipes/libcuml +RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcuml rapids-upload-conda-to-s3 cpp diff --git a/ci/build_python.sh b/ci/build_python.sh index fcf0f7fe26..e1397e3373 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2022-2023, NVIDIA CORPORATION. +# Copyright (c) 2022-2024, NVIDIA CORPORATION. set -euo pipefail @@ -13,15 +13,7 @@ export CMAKE_GENERATOR=Ninja rapids-print-env -package_name="cuml" -package_dir="python" - -version=$(rapids-generate-version) -git_commit=$(git rev-parse HEAD) -export RAPIDS_PACKAGE_VERSION=${version} - -echo "${version}" > VERSION -sed -i "/^__git_commit__/ s/= .*/= \"${git_commit}\"/g" "${package_dir}/${package_name}/_version.py" +rapids-generate-version > ./VERSION rapids-logger "Begin py build" @@ -29,7 +21,7 @@ CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) # TODO: Remove `--no-test` flag once importing on a CPU # node works correctly -rapids-conda-retry mambabuild \ +RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ --channel "${CPP_CHANNEL}" \ conda/recipes/cuml @@ -38,7 +30,7 @@ rapids-conda-retry mambabuild \ # version RAPIDS_CUDA_MAJOR="${RAPIDS_CUDA_VERSION%%.*}" if [[ ${RAPIDS_CUDA_MAJOR} == "11" ]]; then - rapids-conda-retry mambabuild \ + RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --no-test \ conda/recipes/cuml-cpu fi diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index d74acc744a..62b579e203 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. set -euo pipefail @@ -9,43 +9,13 @@ package_dir="python" source rapids-configure-sccache source rapids-date-string -version=$(rapids-generate-version) -git_commit=$(git rev-parse HEAD) - RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" # This is the version of the suffix with a preceding hyphen. It's used # everywhere except in the final wheel name. PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}" -# Patch project metadata files to include the CUDA version suffix and version override. -pyproject_file="${package_dir}/pyproject.toml" - -sed -i "/^name.*cuml/ s/= \"cuml\"/= \"cuml${PACKAGE_CUDA_SUFFIX}\"/g" ${pyproject_file} -echo "${version}" > VERSION -sed -i "/^__git_commit__ / s/= .*/= \"${git_commit}\"/g" "${package_dir}/${package_name}/_version.py" - -# For nightlies we want to ensure that we're pulling in alphas as well. The -# easiest way to do so is to augment the spec with a constraint containing a -# min alpha version that doesn't affect the version bounds but does allow usage -# of alpha versions for that dependency without --pre -alpha_spec='' -if ! rapids-is-release-build; then - alpha_spec=',>=0.0.0a0' -fi - -for dep in cudf pylibraft raft-dask rmm; do - sed -r -i "s/${dep}==(.*)\"/${dep}${PACKAGE_CUDA_SUFFIX}==\1${alpha_spec}\"/g" ${pyproject_file} -done - -for dep in dask-cuda rapids-dask-dependency; do - sed -r -i "s/${dep}==(.*)\"/${dep}==\1${alpha_spec}\"/g" ${pyproject_file} -done - -if [[ $PACKAGE_CUDA_SUFFIX == "-cu12" ]]; then - sed -i "s/cuda-python[<=>\.,0-9]*/cuda-python>=12.0,<13.0/g" ${pyproject_file} - sed -i "s/cupy-cuda11x/cupy-cuda12x/g" ${pyproject_file} -fi +rapids-generate-version > ./VERSION cd ${package_dir} diff --git a/ci/release/update-version.sh b/ci/release/update-version.sh index 273a375ea3..d52daac1f4 100755 --- a/ci/release/update-version.sh +++ b/ci/release/update-version.sh @@ -61,7 +61,7 @@ DEPENDENCIES=( ) for FILE in dependencies.yaml conda/environments/*.yaml; do for DEP in "${DEPENDENCIES[@]}"; do - sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*/g" "${FILE}" + sed_runner "/-.* ${DEP}\(-cu[[:digit:]]\{2\}\)\{0,1\}==/ s/==.*/==${NEXT_SHORT_TAG_PEP440}.*,>=0.0.0a0/g" "${FILE}" done done diff --git a/conda/environments/all_cuda-118_arch-x86_64.yaml b/conda/environments/all_cuda-118_arch-x86_64.yaml index f5191d8b06..492689f8c1 100644 --- a/conda/environments/all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/all_cuda-118_arch-x86_64.yaml @@ -12,12 +12,12 @@ dependencies: - cuda-python>=11.7.1,<12.0a0 - cuda-version=11.8 - cudatoolkit -- cudf==24.8.* +- cudf==24.8.*,>=0.0.0a0 - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* -- dask-cudf==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 +- dask-cudf==24.8.*,>=0.0.0a0 - dask-ml - doxygen=1.9.1 - gcc_linux-64=11.* @@ -31,16 +31,16 @@ dependencies: - libcublas=11.11.3.6 - libcufft-dev=10.9.0.58 - libcufft=10.9.0.58 -- libcumlprims==24.8.* +- libcumlprims==24.8.*,>=0.0.0a0 - libcurand-dev=10.3.0.86 - libcurand=10.3.0.86 - libcusolver-dev=11.4.1.48 - libcusolver=11.4.1.48 - libcusparse-dev=11.7.5.86 - libcusparse=11.7.5.86 -- libraft-headers==24.8.* -- libraft==24.8.* -- librmm==24.8.* +- libraft-headers==24.8.*,>=0.0.0a0 +- libraft==24.8.*,>=0.0.0a0 +- librmm==24.8.*,>=0.0.0a0 - nbsphinx - ninja - nltk @@ -50,7 +50,7 @@ dependencies: - packaging - pip - pydata-sphinx-theme!=0.14.2 -- pylibraft==24.8.* +- pylibraft==24.8.*,>=0.0.0a0 - pynndescent==0.5.8 - pytest-benchmark - pytest-cases @@ -58,10 +58,11 @@ dependencies: - pytest-xdist - pytest==7.* - python>=3.9,<3.12 -- raft-dask==24.8.* -- rapids-dask-dependency==24.8.* +- raft-dask==24.8.*,>=0.0.0a0 +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn==1.5 - scipy>=1.8.0 diff --git a/conda/environments/all_cuda-122_arch-x86_64.yaml b/conda/environments/all_cuda-122_arch-x86_64.yaml index 342477ff98..9de4c6f2e1 100644 --- a/conda/environments/all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/all_cuda-122_arch-x86_64.yaml @@ -14,12 +14,12 @@ dependencies: - cuda-profiler-api - cuda-python>=12.0,<13.0a0 - cuda-version=12.2 -- cudf==24.8.* +- cudf==24.8.*,>=0.0.0a0 - cupy>=12.0.0 - cxx-compiler - cython>=3.0.0 -- dask-cuda==24.8.* -- dask-cudf==24.8.* +- dask-cuda==24.8.*,>=0.0.0a0 +- dask-cudf==24.8.*,>=0.0.0a0 - dask-ml - doxygen=1.9.1 - gcc_linux-64=11.* @@ -31,13 +31,13 @@ dependencies: - joblib>=0.11 - libcublas-dev - libcufft-dev -- libcumlprims==24.8.* +- libcumlprims==24.8.*,>=0.0.0a0 - libcurand-dev - libcusolver-dev - libcusparse-dev -- libraft-headers==24.8.* -- libraft==24.8.* -- librmm==24.8.* +- libraft-headers==24.8.*,>=0.0.0a0 +- libraft==24.8.*,>=0.0.0a0 +- librmm==24.8.*,>=0.0.0a0 - nbsphinx - ninja - nltk @@ -46,7 +46,7 @@ dependencies: - packaging - pip - pydata-sphinx-theme!=0.14.2 -- pylibraft==24.8.* +- pylibraft==24.8.*,>=0.0.0a0 - pynndescent==0.5.8 - pytest-benchmark - pytest-cases @@ -54,10 +54,11 @@ dependencies: - pytest-xdist - pytest==7.* - python>=3.9,<3.12 -- raft-dask==24.8.* -- rapids-dask-dependency==24.8.* +- raft-dask==24.8.*,>=0.0.0a0 +- rapids-build-backend>=0.3.0,<0.4.0.dev0 +- rapids-dask-dependency==24.8.*,>=0.0.0a0 - recommonmark -- rmm==24.8.* +- rmm==24.8.*,>=0.0.0a0 - scikit-build-core>=0.7.0 - scikit-learn==1.5 - scipy>=1.8.0 diff --git a/conda/environments/clang_tidy_cuda-118_arch-x86_64.yaml b/conda/environments/clang_tidy_cuda-118_arch-x86_64.yaml index 3bb3f6b0b4..02fdf84732 100644 --- a/conda/environments/clang_tidy_cuda-118_arch-x86_64.yaml +++ b/conda/environments/clang_tidy_cuda-118_arch-x86_64.yaml @@ -19,16 +19,16 @@ dependencies: - libcublas=11.11.3.6 - libcufft-dev=10.9.0.58 - libcufft=10.9.0.58 -- libcumlprims==24.8.* +- libcumlprims==24.8.*,>=0.0.0a0 - libcurand-dev=10.3.0.86 - libcurand=10.3.0.86 - libcusolver-dev=11.4.1.48 - libcusolver=11.4.1.48 - libcusparse-dev=11.7.5.86 - libcusparse=11.7.5.86 -- libraft-headers==24.8.* -- libraft==24.8.* -- librmm==24.8.* +- libraft-headers==24.8.*,>=0.0.0a0 +- libraft==24.8.*,>=0.0.0a0 +- librmm==24.8.*,>=0.0.0a0 - ninja - nvcc_linux-64=11.8 - sysroot_linux-64==2.17 diff --git a/conda/environments/cpp_all_cuda-118_arch-x86_64.yaml b/conda/environments/cpp_all_cuda-118_arch-x86_64.yaml index 1c63471e4b..910744cf13 100644 --- a/conda/environments/cpp_all_cuda-118_arch-x86_64.yaml +++ b/conda/environments/cpp_all_cuda-118_arch-x86_64.yaml @@ -17,16 +17,16 @@ dependencies: - libcublas=11.11.3.6 - libcufft-dev=10.9.0.58 - libcufft=10.9.0.58 -- libcumlprims==24.8.* +- libcumlprims==24.8.*,>=0.0.0a0 - libcurand-dev=10.3.0.86 - libcurand=10.3.0.86 - libcusolver-dev=11.4.1.48 - libcusolver=11.4.1.48 - libcusparse-dev=11.7.5.86 - libcusparse=11.7.5.86 -- libraft-headers==24.8.* -- libraft==24.8.* -- librmm==24.8.* +- libraft-headers==24.8.*,>=0.0.0a0 +- libraft==24.8.*,>=0.0.0a0 +- librmm==24.8.*,>=0.0.0a0 - ninja - nvcc_linux-64=11.8 - sysroot_linux-64==2.17 diff --git a/conda/environments/cpp_all_cuda-122_arch-x86_64.yaml b/conda/environments/cpp_all_cuda-122_arch-x86_64.yaml index 8c47b6348b..694380f42e 100644 --- a/conda/environments/cpp_all_cuda-122_arch-x86_64.yaml +++ b/conda/environments/cpp_all_cuda-122_arch-x86_64.yaml @@ -17,13 +17,13 @@ dependencies: - gcc_linux-64=11.* - libcublas-dev - libcufft-dev -- libcumlprims==24.8.* +- libcumlprims==24.8.*,>=0.0.0a0 - libcurand-dev - libcusolver-dev - libcusparse-dev -- libraft-headers==24.8.* -- libraft==24.8.* -- librmm==24.8.* +- libraft-headers==24.8.*,>=0.0.0a0 +- libraft==24.8.*,>=0.0.0a0 +- librmm==24.8.*,>=0.0.0a0 - ninja - sysroot_linux-64==2.17 name: cpp_all_cuda-122_arch-x86_64 diff --git a/conda/recipes/cuml-cpu/meta.yaml b/conda/recipes/cuml-cpu/meta.yaml index 2e3ade6996..ec5fa195e2 100644 --- a/conda/recipes/cuml-cpu/meta.yaml +++ b/conda/recipes/cuml-cpu/meta.yaml @@ -28,6 +28,7 @@ requirements: - python x.x - scikit-build-core >=0.7.0 - cython>=3.0.0 + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: - python x.x - numpy>=1.23,<2.0a0 diff --git a/conda/recipes/cuml/meta.yaml b/conda/recipes/cuml/meta.yaml index 6e4e0bada2..5fd0e58b40 100644 --- a/conda/recipes/cuml/meta.yaml +++ b/conda/recipes/cuml/meta.yaml @@ -71,6 +71,7 @@ requirements: - raft-dask ={{ minor_version }} - scikit-build-core >=0.7.0 - treelite {{ treelite_version }} + - rapids-build-backend>=0.3.0,<0.4.0.dev0 run: - {{ pin_compatible('cuda-version', max_pin='x', min_pin='x') }} {% if cuda_major == "11" %} diff --git a/dependencies.yaml b/dependencies.yaml index 4b383bedac..d0cc7a0285 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -13,6 +13,7 @@ files: - py_build - py_run - py_version + - rapids_build_backend - test_python cpp_all: output: conda @@ -69,6 +70,13 @@ files: output: pyproject extras: table: build-system + includes: + - rapids_build_backend + py_rapids_build: + output: pyproject + extras: + table: tool.rapids-build-backend + key: requires includes: - common_build - py_build @@ -92,6 +100,17 @@ channels: - conda-forge - nvidia dependencies: + rapids_build_backend: + common: + - output_types: [conda, requirements, pyproject] + packages: + - rapids-build-backend>=0.3.0,<0.4.0.dev0 + - output_types: [conda] + packages: + - scikit-build-core>=0.7.0 + - output_types: [requirements, pyproject] + packages: + - scikit-build-core[pyproject]>=0.7.0 checks: common: - output_types: [conda, requirements] @@ -116,10 +135,10 @@ dependencies: packages: - c-compiler - cxx-compiler - - libcumlprims==24.8.* - - libraft==24.8.* - - libraft-headers==24.8.* - - librmm==24.8.* + - libcumlprims==24.8.*,>=0.0.0a0 + - libraft==24.8.*,>=0.0.0a0 + - libraft-headers==24.8.*,>=0.0.0a0 + - librmm==24.8.*,>=0.0.0a0 specific: - output_types: conda matrices: @@ -157,18 +176,14 @@ dependencies: - &treelite treelite==4.1.2 - output_types: conda packages: - - &pylibraft_conda pylibraft==24.8.* - - &rmm_conda rmm==24.8.* - - scikit-build-core>=0.7.0 + - &pylibraft_conda pylibraft==24.8.*,>=0.0.0a0 + - &rmm_conda rmm==24.8.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file # This index is needed for cudf and rmm. - --extra-index-url=https://pypi.nvidia.com - --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple - - output_types: [pyproject, requirements] - packages: - - scikit-build-core[pyproject]>=0.7.0 specific: - output_types: [conda, requirements, pyproject] matrices: @@ -176,26 +191,33 @@ dependencies: cuda: "12.*" packages: - cuda-python>=12.0,<13.0a0 - - matrix: # All CUDA 11 versions + - matrix: + cuda: "11.*" packages: - cuda-python>=11.7.1,<12.0a0 + - matrix: + packages: + - cuda-python - output_types: [requirements, pyproject] matrices: - matrix: {cuda: "12.*"} packages: - - pylibraft-cu12==24.8.* - - rmm-cu12==24.8.* + - pylibraft-cu12==24.8.*,>=0.0.0a0 + - rmm-cu12==24.8.*,>=0.0.0a0 - matrix: {cuda: "11.*"} packages: - - &pylibraft_cu11 pylibraft-cu11==24.8.* - - &rmm_cu11 rmm-cu11==24.8.* - - {matrix: null, packages: [*pylibraft_conda, *rmm_conda] } + - &pylibraft_cu11 pylibraft-cu11==24.8.*,>=0.0.0a0 + - &rmm_cu11 rmm-cu11==24.8.*,>=0.0.0a0 + - matrix: + packages: + - pylibraft==24.8.*,>=0.0.0a0 + - rmm==24.8.*,>=0.0.0a0 py_run: common: - output_types: [conda, requirements, pyproject] packages: - - dask-cuda==24.8.* + - dask-cuda==24.8.*,>=0.0.0a0 - joblib>=0.11 - numba>=0.57 # TODO: Is scipy really a hard dependency, or should @@ -203,14 +225,14 @@ dependencies: # installation/run_constrained for conda)? - scipy>=1.8.0 - packaging - - rapids-dask-dependency==24.8.* + - rapids-dask-dependency==24.8.*,>=0.0.0a0 - *treelite - output_types: conda packages: - - &cudf_conda cudf==24.8.* + - &cudf_conda cudf==24.8.*,>=0.0.0a0 - &cupy_conda cupy>=12.0.0 - - &dask_cudf_conda dask-cudf==24.8.* - - &raft_dask_conda raft-dask==24.8.* + - &dask_cudf_conda dask-cudf==24.8.*,>=0.0.0a0 + - &raft_dask_conda raft-dask==24.8.*,>=0.0.0a0 - output_types: requirements packages: # pip recognizes the index as a global option for the requirements.txt file @@ -222,21 +244,21 @@ dependencies: matrices: - matrix: {cuda: "12.*"} packages: - - cudf-cu12==24.8.* + - cudf-cu12==24.8.*,>=0.0.0a0 - cupy-cuda12x>=12.0.0 - - dask-cudf-cu12==24.8.* - - pylibraft-cu12==24.8.* - - raft-dask-cu12==24.8.* - - rmm-cu12==24.8.* + - dask-cudf-cu12==24.8.*,>=0.0.0a0 + - pylibraft-cu12==24.8.*,>=0.0.0a0 + - raft-dask-cu12==24.8.*,>=0.0.0a0 + - rmm-cu12==24.8.*,>=0.0.0a0 - matrix: {cuda: "11.*"} packages: &py_run_packages_cu11 - - cudf-cu11==24.8.* + - cudf-cu11==24.8.*,>=0.0.0a0 - &cupy_pyproject_cu11 cupy-cuda11x>=12.0.0 - - dask-cudf-cu11==24.8.* + - dask-cudf-cu11==24.8.*,>=0.0.0a0 - *pylibraft_cu11 - - raft-dask-cu11==24.8.* + - raft-dask-cu11==24.8.*,>=0.0.0a0 - *rmm_cu11 - - matrix: null + - matrix: packages: - *cudf_conda - *cupy_pyproject_cu11 @@ -386,14 +408,14 @@ dependencies: common: - output_types: conda packages: - - libcuml==24.8.* - - libcuml-tests==24.8.* + - libcuml==24.8.*,>=0.0.0a0 + - libcuml-tests==24.8.*,>=0.0.0a0 test_cuml: common: - output_types: conda packages: - - libcuml==24.8.* - - cuml==24.8.* + - libcuml==24.8.*,>=0.0.0a0 + - cuml==24.8.*,>=0.0.0a0 test_cpp: common: - output_types: conda diff --git a/python/cuml/_version.py b/python/cuml/_version.py index 87cb6a74d5..4863c89c5e 100644 --- a/python/cuml/_version.py +++ b/python/cuml/_version.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023, NVIDIA CORPORATION. +# Copyright (c) 2023-2024, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -16,6 +16,11 @@ import importlib.resources __version__ = ( - importlib.resources.files("cuml").joinpath("VERSION").read_text().strip() + importlib.resources.files(__package__).joinpath("VERSION").read_text().strip() ) -__git_commit__ = "" +try: + __git_commit__ = importlib.resources.files(__package__).joinpath("GIT_COMMIT").read_text().strip() +except FileNotFoundError: + __git_commit__ = "" + +__all__ = ["__git_commit__", "__version__"] diff --git a/python/cuml/tests/test_version.py b/python/cuml/tests/test_version.py new file mode 100644 index 0000000000..7e924de588 --- /dev/null +++ b/python/cuml/tests/test_version.py @@ -0,0 +1,12 @@ +# Copyright (c) 2024, NVIDIA CORPORATION. + +import cuml + + +def test_version_constants_are_populated(): + # __git_commit__ will only be non-empty in a built distribution + assert isinstance(cuml.__git_commit__, str) + + # __version__ should always be non-empty + assert isinstance(cuml.__version__, str) + assert len(cuml.__version__) > 0 diff --git a/python/pyproject.toml b/python/pyproject.toml index 3a970e6d3f..44e4e6e8c5 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -14,16 +14,10 @@ [build-system] requires = [ - "cmake>=3.26.4", - "cuda-python>=11.7.1,<12.0a0", - "cython>=3.0.0", - "ninja", - "pylibraft==24.8.*", - "rmm==24.8.*", + "rapids-build-backend>=0.3.0,<0.4.0.dev0", "scikit-build-core[pyproject]>=0.7.0", - "treelite==4.1.2", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. -build-backend = "scikit_build_core.build" +build-backend = "rapids_build_backend.build" [tool.pytest.ini_options] markers = [ @@ -86,17 +80,17 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "cudf==24.8.*", + "cudf==24.8.*,>=0.0.0a0", "cupy-cuda11x>=12.0.0", - "dask-cuda==24.8.*", - "dask-cudf==24.8.*", + "dask-cuda==24.8.*,>=0.0.0a0", + "dask-cudf==24.8.*,>=0.0.0a0", "joblib>=0.11", "numba>=0.57", "packaging", - "pylibraft==24.8.*", - "raft-dask==24.8.*", - "rapids-dask-dependency==24.8.*", - "rmm==24.8.*", + "pylibraft==24.8.*,>=0.0.0a0", + "raft-dask==24.8.*,>=0.0.0a0", + "rapids-dask-dependency==24.8.*,>=0.0.0a0", + "rmm==24.8.*,>=0.0.0a0", "scipy>=1.8.0", "treelite==4.1.2", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. @@ -156,6 +150,19 @@ versioneer\.py | )/ ''' +[tool.rapids-build-backend] +build-backend = "scikit_build_core.build" +requires = [ + "cmake>=3.26.4", + "cuda-python", + "cython>=3.0.0", + "ninja", + "pylibraft==24.8.*,>=0.0.0a0", + "rmm==24.8.*,>=0.0.0a0", + "treelite==4.1.2", +] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../dependencies.yaml and run `rapids-dependency-file-generator`. +dependencies-file = "../dependencies.yaml" + [tool.scikit-build] build-dir = "build/{wheel_tag}" cmake.build-type = "Release"