-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Initial GPU CI setup #29130
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
Merged
Merged
Initial GPU CI setup #29130
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
ca51b9c
Initial GPU CI setup
betatim 1b06c5b
Give the workflow a name
betatim 2bc3987
Execute workflow also on pull requests
betatim b376491
Look around
betatim 0421a38
Mamba solver is already configured
betatim 169a707
Conda permissions
betatim 4736792
sudo make me a sandwich
betatim c66620e
sudo chown
betatim 8397056
miniforge
betatim b30d217
miniforge
betatim 56d4472
miniforge
betatim 9b07c31
miniforge
betatim a6de469
miniforge
betatim 1d9f1df
miniforge
betatim 4dd748e
Use a dedicated env/lock file for array API
betatim bb7bfcd
Use inputs
betatim 6f1832f
Fix cupy version
betatim f27d848
Use a cache for the conda environment
betatim d710236
Update path
betatim 618fb38
Test the cache
betatim 468a6c3
Enable build parallelism
betatim a6ef0a1
Restrict permissions of the GitHub token
betatim b409225
Remove unused build parallelism env var
betatim fe07d86
Set a meaningful tag
betatim 08fcecb
Configure automatic lockfile update
betatim 5e7b0da
Rename workflow job
betatim 43b8537
Remove package constraints
betatim 4d5b7c7
Merge branch 'main' into betatim/gpu-ci
betatim d19551d
Remove "pull_request" trigger
betatim e68fcc5
Add ability to use more than one channel
betatim 0848964
Add comment about invalidating install cache
betatim 7224cff
Fix script name typo
betatim be358ab
Trigger CUDA tests from update lockfile update workflow
betatim 99bc922
Rename lock files
betatim 7b02cd2
Explicitly state that runner is selected by group name
betatim 8d08b60
Update
betatim 39f9407
Move everything to script
thomasjpfan 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 hidden or 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,47 @@ | ||
name: CUDA GPU | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
pr_id: | ||
description: Test the contents of this Pull Request | ||
required: true | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
tests: | ||
runs-on: | ||
group: cuda-gpu-runner-group | ||
name: Run Array API unit tests | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.12' | ||
- name: Checkout main repository | ||
uses: actions/checkout@v2 | ||
- name: Checkout a particular Pull Request | ||
if: inputs.pr_id | ||
env: | ||
PR_ID: ${{ inputs.pr_id }} | ||
GH_TOKEN: ${{ github.token }} | ||
run: | | ||
gh pr checkout ${{ env.PR_ID }} | ||
- name: Cache conda environment | ||
id: cache-conda | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/conda | ||
key: ${{ runner.os }}-build-${{ hashFiles('build_tools/github/create_gpu_environment.sh') }}-${{ hashFiles('build_tools/github/pylatest_conda_forge_cuda_array-api_linux-64_conda.lock') }} | ||
- name: Install miniforge | ||
if: ${{ steps.cache-conda.outputs.cache-hit != 'true' }} | ||
run: bash build_tools/github/create_gpu_environment.sh | ||
- name: Install scikit-learn | ||
run: | | ||
source "${HOME}/conda/etc/profile.d/conda.sh" | ||
conda activate sklearn | ||
pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable . | ||
- name: Run array API tests | ||
run: | | ||
source "${HOME}/conda/etc/profile.d/conda.sh" | ||
conda activate sklearn | ||
pytest -k 'array_api' |
This file contains hidden or 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
This file contains hidden or 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 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
curl -L -O "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" | ||
bash Miniforge3-$(uname)-$(uname -m).sh -b -p "${HOME}/conda" | ||
source "${HOME}/conda/etc/profile.d/conda.sh" | ||
|
||
|
||
# defines the get_dep and show_installed_libraries functions | ||
source build_tools/shared.sh | ||
conda activate base | ||
|
||
# XXX switch once https://github.com/scikit-learn/scikit-learn/pull/29176 is merged | ||
conda install -c conda-forge "$(get_dep conda-lock min)" -y | ||
conda-lock install --name sklearn build_tools/github/pylatest_conda_forge_cuda_array-api_linux-64_conda.lock |
Oops, something went wrong.
Oops, something went wrong.
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.
I think the only way to test that this is correct is to merge this PR :-/