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 wheel builds to cuxfilter #497

Merged
merged 58 commits into from
Jul 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
93e1471
update to cuda12
AjayThorve Jul 5, 2023
952d660
migrate to pyproject.toml
AjayThorve Jun 30, 2023
2a13105
add gha to build, publish and test wheels
AjayThorve Jun 30, 2023
9736d17
add new line at the end
AjayThorve Jun 30, 2023
595082f
add apply_wheel_modifications script
AjayThorve Jun 30, 2023
10dcf41
rm README file
AjayThorve Jun 30, 2023
964ebbd
Add symbolic link to README file to fix pyproject.toml referencing a …
AjayThorve Jun 30, 2023
1198848
fix typo
AjayThorve Jun 30, 2023
b315075
Update .pre-commit-config.yaml
AjayThorve Jul 7, 2023
49d3c88
update to cuda12
AjayThorve Jul 7, 2023
9690c3f
fix pyproject.toml path
AjayThorve Jul 7, 2023
6e92fa8
update dependencies.yaml to include pyproject.toml
AjayThorve Jul 7, 2023
167ea9b
version conditions in pep508
AjayThorve Jul 7, 2023
ebe0d1e
rm manifest and _version
AjayThorve Jul 7, 2023
3c794bf
fix versions
AjayThorve Jul 7, 2023
f975324
add newline at end
AjayThorve Jul 7, 2023
8194361
fix dependencies
AjayThorve Jul 11, 2023
91f258e
wheels for CUDA 12 use cupy-cuda12x
AjayThorve Jul 11, 2023
582b416
fix modification scripts for typos
AjayThorve Jul 11, 2023
e6fa115
Merge branch 'branch-23.08' of github.com:rapidsai/cuxfilter into add…
AjayThorve Jul 11, 2023
efd2f4f
use wheels-pure workflows for pure python builds
AjayThorve Jul 11, 2023
07ccd5c
remove incorrect input
AjayThorve Jul 11, 2023
238581a
update to cuda12
AjayThorve Jul 5, 2023
7561383
migrate to pyproject.toml
AjayThorve Jun 30, 2023
f8e992e
add gha to build, publish and test wheels
AjayThorve Jun 30, 2023
343e4b7
add new line at the end
AjayThorve Jun 30, 2023
580f1c0
add apply_wheel_modifications script
AjayThorve Jun 30, 2023
9f1d287
rm README file
AjayThorve Jun 30, 2023
000969c
Add symbolic link to README file to fix pyproject.toml referencing a …
AjayThorve Jun 30, 2023
e64915f
fix typo
AjayThorve Jun 30, 2023
d3ee729
Update .pre-commit-config.yaml
AjayThorve Jul 7, 2023
fb40b09
update to cuda12
AjayThorve Jul 7, 2023
d124ee1
fix pyproject.toml path
AjayThorve Jul 7, 2023
f20cb8c
update dependencies.yaml to include pyproject.toml
AjayThorve Jul 7, 2023
ab01fd3
version conditions in pep508
AjayThorve Jul 7, 2023
aab4898
rm manifest and _version
AjayThorve Jul 7, 2023
0753fc3
fix versions
AjayThorve Jul 7, 2023
01b9c4b
add newline at end
AjayThorve Jul 7, 2023
4ac9db1
fix dependencies
AjayThorve Jul 11, 2023
ca1919c
wheels for CUDA 12 use cupy-cuda12x
AjayThorve Jul 11, 2023
991719c
fix modification scripts for typos
AjayThorve Jul 11, 2023
0dd4755
Merge branch 'branch-23.08' of github.com:rapidsai/cuxfilter into add…
AjayThorve Jul 11, 2023
3a674f3
use wheels-pure workflows for pure python builds
AjayThorve Jul 11, 2023
67a2697
remove incorrect input
AjayThorve Jul 11, 2023
b517de1
Update .github/workflows/build.yaml
AjayThorve Jul 11, 2023
940230e
Update .github/workflows/build.yaml
AjayThorve Jul 11, 2023
7543e17
Update .github/workflows/pr.yaml
AjayThorve Jul 11, 2023
b41d1d4
Update .flake8
AjayThorve Jul 11, 2023
630185f
Merge branch 'branch-23.08' of github.com:rapidsai/cuxfilter into add…
AjayThorve Jul 11, 2023
f9cd11f
Merge branch 'add-pip-wheels' of github.com:AjayThorve/cuxfilter into…
AjayThorve Jul 11, 2023
3e45265
undo version usage, and use minor_version
AjayThorve Jul 11, 2023
ccbd94d
Apply suggestions from code review
AjayThorve Jul 11, 2023
8c3556c
fix dependencies
AjayThorve Jul 11, 2023
ad01bad
update versions, using `pre-commit autoupdate`
AjayThorve Jul 11, 2023
d5c393e
run updated black
AjayThorve Jul 11, 2023
26e4712
install dask-cuda from source
AjayThorve Jul 12, 2023
6574a6c
remove dask-cuda as a direct dependency, since it's only required for…
AjayThorve Jul 12, 2023
a155801
use pytest-xdist extension
AjayThorve Jul 12, 2023
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
10 changes: 10 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright (c) 2023, NVIDIA CORPORATION.

[flake8]
filename = *.py,
exclude = __init__.py, *.egg, build, docs, .git
ignore =
# line break before binary operator
W503,
# whitespace before :
E203
20 changes: 20 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,23 @@ jobs:
node_type: "gpu-v100-latest-1"
run_script: "ci/build_docs.sh"
sha: ${{ inputs.sha }}
wheel-build:
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cuxfilter
package-dir: python/
wheel-publish:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-publish.yml@cuda-120
with:
build_type: ${{ inputs.build_type || 'branch' }}
branch: ${{ inputs.branch }}
sha: ${{ inputs.sha }}
date: ${{ inputs.date }}
package-name: cuxfilter
18 changes: 18 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
- conda-python-tests
- conda-notebook-tests
- docs-build
- wheel-build
- wheel-tests
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/pr-builder.yaml@cuda-120
checks:
Expand Down Expand Up @@ -55,3 +57,19 @@ jobs:
arch: "amd64"
container_image: "rapidsai/ci:latest"
run_script: "ci/build_docs.sh"
wheel-build:
needs: checks
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-build.yml@cuda-120
with:
build_type: pull-request
package-name: cuxfilter
package-dir: python/
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@cuda-120
with:
build_type: pull-request
package-name: cuxfilter
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"
Copy link
Contributor

@bdice bdice Jul 11, 2023

Choose a reason for hiding this comment

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

You'll need to borrow some logic from here for dask-cuda: https://github.com/rapidsai/cudf/blob/1899fb1990eae693bd74f92fa4a3f6a217889210/.github/workflows/pr.yaml#L132-L133

dask-cuda has to install from source, since the 23.8.*a* packages on PyPI are pre-release / alphas. We can't really use pip install ... --pre because it uses pre-release versions of all packages.

Also note that you'll need to change update-version.sh to accomodate this. https://github.com/rapidsai/cudf/blob/1899fb1990eae693bd74f92fa4a3f6a217889210/ci/release/update-version.sh#L112

I'm not sure if you need just dask-cuda or also dask/distributed so I have suggestions for both.

All of dask/distributed/dask-cuda:

Suggested change
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"
# Test against latest dask/distributed/dask-cuda.
test-before: "python -m pip install git+https://github.com/dask/dask.git@main git+https://github.com/dask/distributed.git@main git+https://github.com/rapidsai/dask-cuda.git@branch-23.08"
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"

Only dask-cuda:

Suggested change
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"
# Test against latest dask-cuda.
test-before: "python -m pip install git+https://github.com/rapidsai/dask-cuda.git@branch-23.08"
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"

Copy link
Member Author

@AjayThorve AjayThorve Jul 12, 2023

Choose a reason for hiding this comment

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

ah okay got it. It would just be dask-cuda at this point. Thanks again!

@bdice I am assuming this is a temporary fix, until dask-cuda has a PyPI stable release (23.8.*?), right?

Copy link
Member Author

@AjayThorve AjayThorve Jul 12, 2023

Choose a reason for hiding this comment

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

Actually @bdice, we don't need dask_cuda as a direct dependency, since it's only used in the dask_cudf based notebooks. So I removed the direct dependency, and added it to notebooks dependency only

Copy link
Contributor

Choose a reason for hiding this comment

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

Great that the dependency could be moved.

To answer your question about whether this would be a temporary fix, it isn't temporary. The dask-cuda wheels used in CI are always pre-release alphas. We are always testing RAPIDS packages on branch-XX.YY against pre-releases of dask-cuda XX.YY to ensure that when the releases are made, everything works together as intended.

Copy link
Member Author

Choose a reason for hiding this comment

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

got it, good to know. Thanks again for the thorough review. Let me know if this looks good to merge.

8 changes: 8 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,11 @@ jobs:
branch: ${{ inputs.branch }}
date: ${{ inputs.date }}
sha: ${{ inputs.sha }}
wheel-tests:
needs: wheel-build
secrets: inherit
uses: rapidsai/shared-action-workflows/.github/workflows/wheels-pure-test.yml@cuda-120
with:
build_type: pull-request
package-name: cuxfilter
test-unittest: "python -m pytest -n 8 ./python/cuxfilter/tests"
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

repos:
- repo: https://github.com/psf/black
rev: 22.10.0
rev: 23.7.0
hooks:
- id: black
files: python/cuxfilter/.*
Expand All @@ -12,7 +12,12 @@ repos:
rev: 6.0.0
hooks:
- id: flake8
args: ["--config=python/setup.cfg"]
args: ["--config=.flake8"]
files: python/.*$
- repo: https://github.com/rapidsai/dependency-file-generator
rev: v1.5.2
hooks:
- id: rapids-dependency-file-generator
args: ["--clean"]
default_language_version:
python: python3
21 changes: 21 additions & 0 deletions ci/release/apply_wheel_modifications.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash
# Copyright (c) 2023, NVIDIA CORPORATION.
#
# Usage: bash apply_wheel_modifications.sh <new_version> <cuda_suffix>

VERSION=${1}
CUDA_SUFFIX=${2}

# pyproject.toml versions
sed -i "s/^version = .*/version = \"${VERSION}\"/g" python/pyproject.toml

# cuxfilter pyproject.toml cuda suffixes
sed -i "s/^name = \"cuxfilter\"/name = \"cuxfilter${CUDA_SUFFIX}\"/g" python/pyproject.toml
# Need to provide the == to avoid modifying the URL
sed -i "s/\"cudf==/\"cudf${CUDA_SUFFIX}==/g" python/pyproject.toml
sed -i "s/\"cuspatial==/\"cuspatial${CUDA_SUFFIX}==/g" python/pyproject.toml
sed -i "s/\"dask-cudf==/\"dask-cudf${CUDA_SUFFIX}==/g" python/pyproject.toml

if [[ $CUDA_SUFFIX == "-cu12" ]]; then
sed -i "s/cupy-cuda11x/cupy-cuda12x/g" python/pyproject.toml
fi
6 changes: 5 additions & 1 deletion ci/release/update-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ function sed_runner() {
sed_runner 's/version = .*/version = '"'${NEXT_SHORT_TAG}'"'/g' docs/source/conf.py
sed_runner 's/release = .*/release = '"'${NEXT_FULL_TAG}'"'/g' docs/source/conf.py

# Python __init__.py updates
sed_runner "s/__version__ = .*/__version__ = \"${NEXT_FULL_TAG}\"/g" python/cuxfilter/__init__.py

DEPENDENCIES=(
cudf
dask-cuda
Expand All @@ -57,7 +60,8 @@ sed_runner "s/cuxfilter=${CURRENT_SHORT_TAG}/cuxfilter=${NEXT_SHORT_TAG}/g" READ

# CI files
for FILE in .github/workflows/*.yaml; do
sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" "${FILE}"
sed_runner "/shared-action-workflows/ s/@.*/@branch-${NEXT_SHORT_TAG}/g" ${FILE};
done

sed_runner "s/RAPIDS_VERSION_NUMBER=\".*/RAPIDS_VERSION_NUMBER=\"${NEXT_SHORT_TAG}\"/g" ci/build_docs.sh
sed_runner "s/RAPIDS_VERSION=.*/RAPIDS_VERSION=${NEXT_SHORT_TAG}.*/g" ci/test_external.sh
1 change: 1 addition & 0 deletions ci/test_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ pushd python/
pytest \
--cache-clear \
--junitxml="${RAPIDS_TESTS_DIR}/junit-cuxfilter.xml" \
--numprocesses=8 \
--cov-config=.coveragerc \
--cov=cuxfilter \
--cov-report=xml:"${RAPIDS_COVERAGE_DIR}/cuxfilter-coverage.xml" \
Expand Down
4 changes: 4 additions & 0 deletions ci/utils/wheel_smoke_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import cuxfilter

if __name__ == '__main__':
assert cuxfilter.__version__ is not None
1 change: 1 addition & 0 deletions conda/environments/all_cuda-118_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies:
- pyproj>=2.4,<=3.4
- pytest
- pytest-cov
- pytest-xdist
- python>=3.9,<3.11
- recommonmark
- sphinx
Expand Down
1 change: 1 addition & 0 deletions conda/environments/all_cuda-120_arch-x86_64.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ dependencies:
- pyproj>=2.4,<=3.4
- pytest
- pytest-cov
- pytest-xdist
- python>=3.9,<3.11
- recommonmark
- sphinx
Expand Down
1 change: 0 additions & 1 deletion conda/recipes/cuxfilter/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ requirements:
- cudf ={{ minor_version }}
- cupy >=12.0.0
- cuspatial ={{ minor_version }}
- dask-cuda ={{ minor_version }}
- dask-cudf ={{ minor_version }}
- datashader >=0.15
- geopandas >=0.11.0
Expand Down
43 changes: 37 additions & 6 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ files:
cuda: ["11.8", "12.0"]
arch: [x86_64]
includes:
- build_wheels
- cudatoolkit
- checks
- docs
Expand Down Expand Up @@ -35,12 +36,40 @@ files:
- cudatoolkit
- docs
- py_version
py_build:
output: pyproject
pyproject_dir: python
extras:
table: build-system
includes:
- build_wheels
py_run:
output: pyproject
pyproject_dir: python
extras:
table: project
includes:
- run
py_test:
output: pyproject
pyproject_dir: python
extras:
table: project.optional-dependencies
key: test
includes:
- test_python
channels:
- rapidsai
- rapidsai-nightly
- conda-forge
- nvidia
dependencies:
build_wheels:
common:
- output_types: pyproject
packages:
- wheel
- setuptools
cudatoolkit:
specific:
- output_types: conda
Expand Down Expand Up @@ -98,6 +127,7 @@ dependencies:
- output_types: [conda]
packages:
- cugraph==23.8.*
- dask-cuda==23.8.*
py_version:
specific:
- output_types: conda
Expand All @@ -115,19 +145,16 @@ dependencies:
- python>=3.9,<3.11
run:
common:
- output_types: [conda, requirements]
- output_types: [conda, requirements, pyproject]
packages:
- bokeh>=2.4.2,<=2.5
- cudf==23.8.*
- cuspatial==23.8.*
- dask-cuda==23.8.*
- dask-cudf==23.8.*
- datashader>=0.15
- geopandas>=0.11.0
- holoviews>=1.15.0,<=1.15.4
- jupyter-server-proxy
- libwebp
- nodejs>=14
- numba>=0.57
- numpy>=1.21
- packaging
Expand All @@ -138,12 +165,16 @@ dependencies:
- output_types: conda
packages:
- cupy>=12.0.0
- output_types: requirements
- nodejs>=14
- libwebp
- output_types: [requirements, pyproject]
packages:
- cupy-cuda11x>=12.0.0
test_python:
common:
- output_types: [conda, requirements]
- output_types: [conda, requirements, pyproject]
packages:
- pytest
- pytest-cov
- pytest-xdist

2 changes: 0 additions & 2 deletions python/MANIFEST.in

This file was deleted.

5 changes: 0 additions & 5 deletions python/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions python/README.md

This file was deleted.

1 change: 1 addition & 0 deletions python/README.md
6 changes: 3 additions & 3 deletions python/cuxfilter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2019-2023, NVIDIA CORPORATION.

from cuxfilter.dataframe import DataFrame
AjayThorve marked this conversation as resolved.
Show resolved Hide resolved
from cuxfilter.dashboard import DashBoard
from ._version import get_versions

__version__ = get_versions()["version"]
del get_versions
__version__ = "23.08.00"
Loading