Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.12 #719

Merged
merged 7 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ concurrency:
jobs:
build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -37,7 +37,7 @@ jobs:
upload-conda:
needs: [build]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand All @@ -46,7 +46,7 @@ jobs:
conda-pack:
needs: [upload-conda]
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ jobs:
- build
- test-conda-nightly-env
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@python-3.12
build:
secrets: inherit
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: pull-request
test-conda-nightly-env:
secrets: inherit
# We use a build workflow so that we get CPU jobs and high matrix coverage
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10
uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@python-3.12
with:
build_type: pull-request
script: "ci/test_conda_nightly_env.sh"
35 changes: 21 additions & 14 deletions conda/recipes/rapids/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,32 @@ requirements:
- numpy {{ numpy_version }}
- nvtx {{ nvtx_version }}
- python
- cudf ={{ major_minor_version }}.*
- cuvs ={{ major_minor_version }}.*
- cugraph ={{ major_minor_version }}.*
- nx-cugraph ={{ major_minor_version }}.*
- cuml ={{ major_minor_version }}.*
- cucim ={{ major_minor_version }}.*
- cuspatial ={{ major_minor_version }}.*
- cuproj ={{ major_minor_version }}.*
- custreamz ={{ major_minor_version }}.*
- cuxfilter ={{ major_minor_version }}.*
- dask-cuda ={{ major_minor_version }}.*
# TODO: remove all the floors on specific nightly versions once RAPIDS supports 'fmt>11' and 'spdlog>14'
- cudf ={{ major_minor_version }}.*,>=24.10.00a320
- cuvs ={{ major_minor_version }}.*,>=24.10.00a60
- cugraph ={{ major_minor_version }}.*,>=24.10.00a74
- nx-cugraph ={{ major_minor_version }}.*,>=24.10.00a74
- cuml ={{ major_minor_version }}.*,>=24.10.00a55
- cucim ={{ major_minor_version }}.*,>=24.10.00a17
- cuspatial ={{ major_minor_version }}.*,>=24.10.00a41
- cuproj ={{ major_minor_version }}.*,>=24.10.00a41
- custreamz ={{ major_minor_version }}.*,>=24.10.00a320
- cuxfilter ={{ major_minor_version }}.*,>=24.10.00a19
- dask-cuda ={{ major_minor_version }}.*,>=24.10.00a19
- rapids-xgboost ={{ major_minor_version }}.*
- rmm ={{ major_minor_version }}.*
- pylibcugraph ={{ major_minor_version }}.*
- libcugraph_etl ={{ major_minor_version }}.*
- rmm ={{ major_minor_version }}.*,>=24.10.00a38
- pylibcugraph ={{ major_minor_version }}.*,>=24.10.00a74
- libcugraph_etl ={{ major_minor_version }}.*,>=24.10.00a74
{% if cuda_major == "11" %}
- ptxcompiler # CUDA enhanced compat. See https://github.com/rapidsai/ptxcompiler
{% endif %}
- conda-forge::ucx {{ ucx_version }}
# TODO: remove pins on pyogrio and tiledb once cuspatial supports 'fmt>11' and 'spdlog>14'
# ref:
# * https://github.com/rapidsai/build-planning/issues/56
# * https://github.com/rapidsai/cuspatial/pull/1453#issuecomment-2335527542
- pyogrio <0.8
- tiledb <2.19
Copy link
Member Author

@jameslamb jameslamb Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks to me like it's taking FOREVER (2+ hours) for conda to solve the runtime environment for the rapids package on Python 3.12.

I strongly suspect that the root cause is "RAPIDS is pinned to an old range of fmt / spdlog versions that causes the solver to have to backtrack a lot to find older versions of spatial dependencies".

The same issue we saw in rapidsai/cuspatial#1453 (comment).

I found that when I explicitly pinned pyogrio and tiledb to versions that were successfully found in recent cuspatial conda test jobs (build link), I can get a successful solve in just a few minutes.

I think doing that here should be ok... this is just helping the solver get to a workable solution faster, and it could be removed once we update the fmt / spdlog pins across RAPIDS (which is in-progress in rapidsai/build-planning#56 and will hopefully be done within the 24.10 release).

Tried the following, pinning a bunch of RAPIDS libraries to their latest nightly versions (to avoid backtracking to other pre-Python-3.12 nightlies), on an x86_64 machine with CUDA 12.2.

conda create \
    --name delete-me \
    --dry-run \
    -v \
    --override-channels \
    --channel rapidsai \
    --channel rapidsai-nightly \
    --channel conda-forge \
    --channel nvidia \
        'cuda-version=12.2' \
        'cudf==24.10.00a320' \
        'cugraph==24.10.00a74' \
        'cuml==24.10.00a55' \
        'cuproj==24.10.00a41' \
        'cupy==13.3.0' \
        'cuspatial==24.10.00a41' \
        'cuxfilter==24.10.00a19' \
        'dask-cudf==24.10.00a320' \
        'libcudf==24.10.00a320' \
        'libraft==24.10.00a32' \
        'libraft-headers==24.10.00a32' \
        'librmm==24.10.00a38' \
        'nccl==2.22.3.1' \
        'numba==0.60.0' \
        'numpy==1.26.4' \
        'nvtx==0.2.10' \
        'pylibcudf==24.10.00a320' \
        'pylibraft==24.10.00a32' \
        'pynvjitlink==0.3.0' \
        'pyogrio<0.8' \
        'python=3.12' \
        'rmm==24.10.00a38' \
        'tiledb<2.19' \
        'conda-forge::ucx==1.17.0' \
        'ucx-py==0.40.00a12'

Copy link
Member Author

@jameslamb jameslamb Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With just the tiledb + pyogrio pins alone here, I still saw 3 of the 4 Python 3.12 builds not making progress after 45 minutes. Just pushed 57edada putting floors on all the RAPIDS libraries, to see if preventing the solver from falling back to earlier nightlies helps.

It should cut the search space significantly, I hope... there have been 320 cudf releases within the 24.10 cycle so far, for example.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the combination of those two changes helped!

conda was able to solve the runtime environment for all the environments we test here: https://github.com/rapidsai/integration/actions/runs/10891738111/job/30223298780?pr=719.

In a manageable amount of time:

  • (amd64, 3.12, 11.8.0, ubuntu22.04) = 30m33s
  • (amd64, 3.12, 12.5.1, ubuntu22.04) = 17m36s
  • (arm64, 3.12, 11.8.0, ubuntu22.04) = 23m08s
  • (arm64, 3.12, 12.5.1, ubuntu22.04) = 19m39s


test:
requires:
Expand Down
Loading