-
Notifications
You must be signed in to change notification settings - Fork 1
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
Initial setup for dask-upstream-testing #1
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4cc487c
Added runner for upstream dask gpu tests
fcaaf08
Narrow the skips
TomAugspurger 15a4ff8
added pre-commit
TomAugspurger bec8e96
rename
TomAugspurger 0edfa21
Fixup
TomAugspurger 564f155
Added pre-commit
TomAugspurger 11f4ce1
Define the schedule here
TomAugspurger ff9bfda
fixed branch
TomAugspurger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,38 @@ | ||
on: | ||
# TODO: change to cron-based schedule one this is working | ||
push: | ||
branches: | ||
- main | ||
# Based off https://github.com/rapidsai/cudf/blob/branch-25.02/.github/workflows/pandas-tests.yaml | ||
name: Test dask-upstream | ||
|
||
on: | ||
schedule: | ||
# 18:15 UTC daily. | ||
# We want to run after the nightly pipeline finishes. | ||
# https://github.com/rapidsai/workflows/blob/main/.github/workflows/nightly-pipeline-trigger.yaml is | ||
# currently set to 5:00 UTC and takes ~12 hours | ||
- cron: "15 18 * * *" | ||
|
||
jobs: | ||
test: | ||
name: "Test dask and distributed" | ||
# TODO: change to appropriate image | ||
runs-on: "linux-amd64-gpu-v100-latest-1" | ||
container: | ||
image: rapidsai/distributed:24.12-cuda11.8.0-devel-ubuntu20.04-py3.12 | ||
env: | ||
NVIDIA_VISIBLE_DEVICES: ${{ env.NVIDIA_VISIBLE_DEVICES }} | ||
setup: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
date: ${{ steps.date.outputs.date }} | ||
branch: ${{ steps.branch.outputs.branch }} | ||
steps: | ||
- name: Checkout ourselves | ||
uses: actions/checkout@v4 | ||
with: | ||
path: utils | ||
- name: Checkout dask | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: dask/dask | ||
path: dask | ||
- name: Checkout distributed | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: dask/distributed | ||
path: distributed | ||
- name: Run | ||
run: | | ||
(cd dask; git rev-parse HEAD; | ||
cd ../distributed; git rev-parse HEAD) | tee commit-hashes.txt | ||
- name: Upload commit hashes | ||
TomAugspurger marked this conversation as resolved.
Show resolved
Hide resolved
|
||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: commit-hashes.txt | ||
path: commit-hashes.txt | ||
- name: Setup python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12 | ||
- name: Get last artifact URL from last run | ||
id: get_last_id | ||
run: | | ||
pip install requests | ||
VAL=$(python utils/get.py) | ||
echo "${VAL}" | ||
echo "${VAL}" >> $GITHUB_OUTPUT | ||
- name: Download artifact from last run if exists | ||
if: ${{ fromJSON(steps.get_last_id.outputs.INFO).exists }} | ||
continue-on-error: true | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: commit-hashes.txt | ||
path: previous-run | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
run-id: ${{ fromJSON(steps.get_last_id.outputs.INFO).id }} | ||
- name: Check if test run is needed | ||
id: check_run_needed | ||
run: | | ||
ls -l previous-run/ | ||
if [ ! -f previous-run/commit-hashes.txt ]; then | ||
echo "No previous run hashes, need to re-run" | ||
echo 'INFO={"rerun": true}' >> $GITHUB_OUTPUT | ||
elif cmp -s commit-hashes.txt previous-run/commit-hashes.txt; then | ||
echo "Previous run hash same as this one, no need to re-run" | ||
echo 'INFO={"rerun": false}' >> $GITHUB_OUTPUT | ||
else | ||
echo "Previous run hash different, need to re-run" | ||
echo 'INFO={"rerun": true}' >> $GITHUB_OUTPUT | ||
fi | ||
- name: Run tests | ||
if: ${{ fromJSON(steps.check_run_needed.outputs.INFO).rerun }} | ||
run: | | ||
echo Running tests | ||
nvidia-smi | ||
- name: Get current date | ||
id: date | ||
run: echo name=date::$(date +'%Y-%m-%d')" >> "$GITHUB_OUTPUT" | ||
- name: Get current branch | ||
id: branch | ||
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT | ||
|
||
dask-tests: | ||
needs: setup | ||
# run the Dask and Distributed unit tests | ||
secrets: inherit | ||
uses: rapidsai/shared-workflows/.github/workflows/[email protected] | ||
with: | ||
# This selects "ARCH=amd64 + the latest supported Python + CUDA". | ||
matrix_filter: map(select(.ARCH == "amd64")) | group_by(.CUDA_VER|split(".")|map(tonumber)|.[0]) | map(max_by([(.PY_VER|split(".")|map(tonumber)), (.CUDA_VER|split(".")|map(tonumber))])) | ||
build_type: nightly | ||
branch: ${{ needs.setup.outputs.branch }} | ||
date: ${{ needs.setup.outputs.date }} | ||
sha: ${{ github.sha }} | ||
script: scripts/run.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dask | ||
distributed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (c) 2025, NVIDIA CORPORATION. | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v5.0.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
exclude: | | ||
(?x)^( | ||
^cpp/cmake/thirdparty/patches/.*| | ||
^python/cudf/cudf/tests/data/subword_tokenizer_data/.* | ||
) | ||
- id: end-of-file-fixer | ||
exclude: | | ||
(?x)^( | ||
^cpp/cmake/thirdparty/patches/.*| | ||
^python/cudf/cudf/tests/data/subword_tokenizer_data/.* | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,9 @@ | ||
# Dask Upstream Testing | ||
|
||
This repository contains the scripts to run Dask's `gpu`-marked tests on a schedule. | ||
|
||
## Version Policy | ||
|
||
The primary goal here is to quickly identify breakages in tests defined in `dask/dask` and `dask/distributed`, so we'll use the latest `main` from each of those. | ||
|
||
When breakages occur, they'll generally be fixed either in Dask or in the the nightly versions of the downstream packages (rapids, cupy, numba, etc.). And so we install the nightly (rather than `latest`) version of the downstream packages. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-FileCopyrightText: Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES. | ||
|
||
# Install | ||
set -euo pipefail | ||
|
||
RAPIDS_PY_CUDA_SUFFIX="cu${RAPIDS_CUDA_VERSION:-12}" | ||
|
||
# TODO: set this to main once dask-cudf is compatible | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think rapidsai/dask-cuda#1424 is the PR to track here. For now, using 2024.12.1 is slightly preferable, otherwise all the tests fail on import. |
||
# DASK_VERSION=main | ||
DASK_VERSION=2024.12.1 | ||
export PIP_YES=true | ||
export PIP_PRE=true | ||
|
||
pip install --extra-index-url=https://pypi.anaconda.org/rapidsai-wheels-nightly/simple \ | ||
"cudf-${RAPIDS_PY_CUDA_SUFFIX}" \ | ||
"dask-cudf-${RAPIDS_PY_CUDA_SUFFIX}" \ | ||
"ucx-py-${RAPIDS_PY_CUDA_SUFFIX}" \ | ||
"scipy" \ | ||
"dask-cuda" | ||
|
||
echo "Installing dask@{DASK_VERSION}" | ||
|
||
if [ ! -d "dask" ]; then | ||
git clone https://github.com/dask/dask | ||
fi | ||
|
||
if [ ! -d "distributed" ]; then | ||
git clone https://github.com/dask/distributed | ||
fi | ||
|
||
pip uninstall dask distributed | ||
cd dask && git clean -fdx && git checkout $DASK_VERSION && pip install -e .[test] && cd .. | ||
cd distributed && git clean -fdx && git checkout $DASK_VERSION && pip install -e . && cd .. | ||
|
||
./scripts/test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
# SPDX-FileCopyrightText: Copyright (c) 2023-2025, NVIDIA CORPORATION & AFFILIATES. | ||
|
||
pushd dask | ||
pytest dask -v -m gpu | ||
dask_status=$? | ||
popd | ||
|
||
pushd distributed | ||
pytest distributed -v -m gpu --runslow | ||
distributed_status=$? | ||
popd | ||
|
||
if [ $dask_status -ne 0 ] || [ $distributed_status -ne 0 ]; then | ||
echo "Tests faild" | ||
exit 1 | ||
fi |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need another job to actually trigger this, e.g. https://github.com/rapidsai/cudf/blob/cb77046d8baad31f4856c097f7052b3a3858c363/.github/workflows/build.yaml#L180. I wonder if the workflow-dispatch stuff is needed, or if we can just use a cron job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see an example of cron triggers in our nightly builds here:
https://github.com/rapidsai/workflows/blob/main/.github/workflows/nightly-pipeline-trigger.yaml
https://github.com/rapidsai/workflows/blob/main/.github/workflows/nightly-pipeline.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, thanks. I gave up searching after I didn't see it in either rapidsai/cudf or rapidsai/shared-workflows :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC, rapidsai/workflows#69 should be necessary and sufficient to get this workflow running on a schedule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on a suggestion from @wence-, I've moved the cron definition here to avoid the need for this cross-repo dispatch.
I'm not sure if we can test this before merging, but I've hopefully gotten the GitHub Action set up so that we have all the inputs necessary for the
rapidsai/shared-workflows/.github/workflows/[email protected]
workflow to run. Does anyone know offhand if things like${{ inputs.date }}
will be available? My guess is that those came from the workflow dispatch, so I've added a job to collect that and the branch name.