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 tests to CI #1416

Merged
merged 18 commits into from
Jan 6, 2025
Merged

Conversation

gforsyth
Copy link
Contributor

@gforsyth gforsyth commented Dec 13, 2024

Adding this now that wheels are available

  • deps(kvikio): add kvikio to CUDA version matrices
  • test(wheels): enable wheel tests in CI

Resolves #1344

@gforsyth gforsyth requested review from a team as code owners December 13, 2024 19:21
@gforsyth gforsyth requested a review from msarahan December 13, 2024 19:21
Copy link

copy-pr-bot bot commented Dec 13, 2024

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@gforsyth gforsyth changed the title deps(kvikio): add kvikio to CUDA version matrices test(wheels): add wheel tests to CI Dec 13, 2024
@gforsyth gforsyth added the non-breaking Non-breaking change label Dec 13, 2024
Copy link
Member

@pentschev pentschev left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @gforsyth !

@gforsyth gforsyth added the improvement Improvement / enhancement to an existing function label Dec 13, 2024
@pentschev pentschev added 3 - Ready for Review Ready for review by team ci improvement Improvement / enhancement to an existing function and removed improvement Improvement / enhancement to an existing function ci labels Dec 13, 2024
@pentschev
Copy link
Member

/ok to test

@pentschev
Copy link
Member

@gforsyth I've triggered CI manually now but FYI going forward you'll need to setup GitHub commit signing to ensure CI runs automatically.

@github-actions github-actions bot added the ci label Dec 13, 2024
@pentschev pentschev changed the title test(wheels): add wheel tests to CI Add wheel tests to CI Dec 16, 2024
@pentschev
Copy link
Member

We don't currently use tags/keyword in the PR titles, so as a nit I just changed its title to contain only the message, this is really just a nit, hope you don't mind Gil. 🙂

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for working on this! Left some suggestions.

Can you please also add a similar entry in https://github.com/rapidsai/dask-cuda/blob/branch-25.02/.github/workflows/test.yaml? You can follow the patterns from other repos, like https://github.com/rapidsai/cudf/blob/branch-25.02/.github/workflows/test.yaml

Those .github/workflows/test.yaml workflow configs define which tests run in 3 scenarios:

@ me if you want some helping resolving the CI failures.

.github/workflows/pr.yaml Outdated Show resolved Hide resolved
ci/test_wheel.sh Outdated Show resolved Hide resolved
ci/test_wheel.sh Outdated Show resolved Hide resolved
- ucx-py-cu12==0.42.*,>=0.0.0a0
- matrix:
cuda: "11.*"
cuda_suffixed: "true"
packages:
- cudf-cu11==25.2.*,>=0.0.0a0
- dask-cudf-cu11==25.2.*,>=0.0.0a0
- kvikio-cu11==25.2.*,>=0.0.0a0
Copy link
Member

Choose a reason for hiding this comment

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

oh nice, thank you!

@jameslamb jameslamb removed the request for review from msarahan December 18, 2024 23:53
@gforsyth
Copy link
Contributor Author

gforsyth commented Jan 6, 2025

Hey @jameslamb -- back to this after a brief interlude.

Could you help me understand the dependency miss in the wheel tests? pip isn't finding the (as yet unpublished) cudf==25.2.*,>=0.0.0a0 -- is there a pre-release staging area that it should be pointing at? Or are there no 25.2.* wheels available for cudf yet?

@jameslamb
Copy link
Member

pip isn't finding the (as yet unpublished) cudf==25.2.,>=0.0.0a0 *

Ah yep! I can help with this:

ERROR: Could not find a version that satisfies the requirement cudf==25.2.*,>=0.0.0a0; extra == "test" (from dask-cuda[test]) (from versions: 0.6.1.post1)
ERROR: No matching distribution found for cudf==25.2.*,>=0.0.0a0; extra == "test"

(build link)

When we publish cudf packages, their distribution names have a suffix appended with the CUDA major version. This error is happening because we don't publish a package called cudf... it's "cudf-cu11" for CUDA 11 and "cudf-cu12" for CUDA 12.

The problem here is that the [test] extra for the dask-cuda wheels has unsuffixed name "cudf" in it.

This is an interesting one ... since we only publish "dask-cuda" (no suffix) here, the same wheel will be pulled in regardless of CUDA version. So we can't depend on a single [test] extra to tell us what versions of dependencies to pull in, because some of those dependencies have to be CUDA-major-version-specific.

I can think of 2 ways to address this:

  • not having any extras for testing dependencies, and just directly installing them
  • having 2 extras, like [test-cuda11] and [test-cuda12]

I think we should try just directly installing them in CI. That'd mean:

  1. prevent that invalid [test] extra from getting written into the wheel:
    py_test:
    output: pyproject
    pyproject_dir: .
    extras:
    table: project.optional-dependencies
    key: test
    includes:
    - test_python
  2. install the testing dependencies directly in ci/test_wheel.sh (follow this related example from cudf)

is there a pre-release staging area that it should be pointing at?

That's already happening in this job.

RAPIDS pre-release packages are published at https://pypi.anaconda.org/rapidsai-wheels-nightly/simple/, and the docker images we run wheel CI in have configuration pointing there: https://github.com/rapidsai/ci-imgs/blob/39aa63d9799dbc9b8268cbbffb2f4d0b39192e67/context/pip.conf#L5

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks! Left one suggestion for your consideration.

ci/test_wheel.sh Outdated
Comment on lines 16 to 19
python -m pip install -v --prefere-binary -r /tmp/requirements-test.txt

# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/dask_cuda*.whl)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
python -m pip install -v --prefere-binary -r /tmp/requirements-test.txt
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/dask_cuda*.whl)
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install \
-r /tmp/requirements-test.txt \
./dist/dask_cuda*.whl

I think we should group these pip install calls together.

That'll reduce the risk of creating an inconsistent environment, and give us a better chance of catching packaging issues.

For example, imagine if dask-cuda had a runtime dependency on numpy<2 but we had a pin of numpy>=2 in testing dependencies. With separate pip install calls, pip would happily downgrade numpy. With them combined, we'll get an informative, loud error saying "hey these requirements are incompatible".

@gforsyth
Copy link
Contributor Author

gforsyth commented Jan 6, 2025

Thanks for all the pointers, @jameslamb ! Still waiting on a few conda jobs, but the wheel tests are green, so this is probably ready for another look!

@jameslamb jameslamb self-requested a review January 6, 2025 18:58
Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

🙌🏻 looking pretty good!

Last suggestion... can you please pull the latest changes from branch-25.02 in here? I think that's a useful practice in general, but especially relevant for this PR because this PR is missing some changes related to dependency versions (#1419).

If we see everything pass and no issues in logs after that, I support merging this.

# echo to expand wildcard
python -m pip install -v --prefer-binary -r /tmp/requirements-test.txt $(echo ./dist/dask_cuda*.whl)

python -m pytest ./dask_cuda/tests -k "not ucxx"
Copy link
Member

Choose a reason for hiding this comment

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

Seems ok to me... looks like the changes from #1406 doing the same thing in the conda Python test jobs hasn't been reverted yet.

Adding this now that wheels are available
@gforsyth
Copy link
Contributor Author

gforsyth commented Jan 6, 2025

Hey @jameslamb -- rebased and green

Copy link
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for working through this!

@jameslamb
Copy link
Member

/merge

@rapids-bot rapids-bot bot merged commit a1d7874 into rapidsai:branch-25.02 Jan 6, 2025
30 checks passed
@gforsyth gforsyth deleted the add-wheel-tests branch January 6, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team ci improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] add wheel tests in CI
3 participants