File tree Expand file tree Collapse file tree 6 files changed +410
-12
lines changed
Filter options
Expand file tree Collapse file tree 6 files changed +410
-12
lines changed
Original file line number Diff line number Diff line change
1
+ name : CUDA GPU
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ pr_id :
6
+ description : Test the contents of this Pull Request
7
+ required : true
8
+
9
+ permissions : read-all
10
+
11
+ jobs :
12
+ tests :
13
+ runs-on :
14
+ group : cuda-gpu-runner-group
15
+ name : Run Array API unit tests
16
+ steps :
17
+ - uses : actions/setup-python@v4
18
+ with :
19
+ python-version : ' 3.12'
20
+ - name : Checkout main repository
21
+ uses : actions/checkout@v2
22
+ - name : Checkout a particular Pull Request
23
+ if : inputs.pr_id
24
+ env :
25
+ PR_ID : ${{ inputs.pr_id }}
26
+ GH_TOKEN : ${{ github.token }}
27
+ run : |
28
+ gh pr checkout ${{ env.PR_ID }}
29
+ - name : Cache conda environment
30
+ id : cache-conda
31
+ uses : actions/cache@v3
32
+ with :
33
+ path : ~/conda
34
+ 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') }}
35
+ - name : Install miniforge
36
+ if : ${{ steps.cache-conda.outputs.cache-hit != 'true' }}
37
+ run : bash build_tools/github/create_gpu_environment.sh
38
+ - name : Install scikit-learn
39
+ run : |
40
+ source "${HOME}/conda/etc/profile.d/conda.sh"
41
+ conda activate sklearn
42
+ pip install --verbose --no-build-isolation --config-settings editable-verbose=true --editable .
43
+ - name : Run array API tests
44
+ run : |
45
+ source "${HOME}/conda/etc/profile.d/conda.sh"
46
+ conda activate sklearn
47
+ pytest -k 'array_api'
Original file line number Diff line number Diff line change 6
6
schedule :
7
7
- cron : ' 0 5 * * 1'
8
8
9
+ # XXX Set the right permissions, per step??
10
+ # Can we set read only at the global level here and then elevate to write for some steps?
11
+ # permissions: read-all
12
+
9
13
jobs :
10
14
update_lock_files :
11
15
if : github.repository == 'scikit-learn/scikit-learn'
25
29
- name : cirrus-arm
26
30
update_script_args : " --select-tag arm"
27
31
additional_commit_message : " [cirrus arm]"
32
+ - name : array API
33
+ update_script_args : " --select-tag cuda"
28
34
29
35
steps :
30
36
- uses : actions/checkout@v4
56
62
### Note
57
63
If the CI tasks fail, create a new branch based on this PR and add the required fixes to that branch.
58
64
65
+ # The CUDA workflow needs to be triggered explicitly as it uses an expensive runner
66
+ - name : Trigger additional tests
67
+ if : steps.cpr.outputs.pull-request-number != '' && matrix.name == 'array API'
68
+ env :
69
+ GH_TOKEN : ${{ github.token }}
70
+ run : |
71
+ gh workflow run .github/workflows/cuda-gpu-ci.yml -f pr_id=${{steps.cpr.outputs.pull-request-number}}
72
+
59
73
- name : Check Pull Request
60
74
if : steps.cpr.outputs.pull-request-number != ''
61
75
run : |
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+ set -x
5
+
6
+ curl -L -O " https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$( uname) -$( uname -m) .sh"
7
+ bash Miniforge3-$( uname) -$( uname -m) .sh -b -p " ${HOME} /conda"
8
+ source " ${HOME} /conda/etc/profile.d/conda.sh"
9
+
10
+
11
+ # defines the get_dep and show_installed_libraries functions
12
+ source build_tools/shared.sh
13
+ conda activate base
14
+
15
+ # XXX switch once https://github.com/scikit-learn/scikit-learn/pull/29176 is merged
16
+ conda install -c conda-forge " $( get_dep conda-lock min) " -y
17
+ conda-lock install --name sklearn build_tools/github/pylatest_conda_forge_cuda_array-api_linux-64_conda.lock
You can’t perform that action at this time.
0 commit comments