Skip to content

Commit 251fddb

Browse files
msaroufimcpuhrsch
andauthored
Github Action Strategy Refactor (#97)
* Increase nightly regression test coverage Have a config that that tries out different runners and pytorch versions * Update regression_test.yml --------- Co-authored-by: cpuhrsch <cpuhrsch@googlemail.com>
1 parent 293ae7b commit 251fddb

File tree

1 file changed

+22
-98
lines changed

1 file changed

+22
-98
lines changed

.github/workflows/regression_test.yml

Lines changed: 22 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -9,114 +9,38 @@ on:
99
- main
1010

1111
jobs:
12-
test-cuda-2-2-2:
13-
runs-on: 4-core-ubuntu-gpu-t4
12+
test:
13+
strategy:
14+
matrix:
15+
include:
16+
- name: CUDA 2.2.2
17+
runs-on: 4-core-ubuntu-gpu-t4
18+
torch-spec: 'torch==2.2.2'
19+
- name: CUDA 2.3 RC
20+
runs-on: 4-core-ubuntu-gpu-t4
21+
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cu121'
22+
- name: CUDA Nightly
23+
runs-on: 4-core-ubuntu-gpu-t4
24+
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cu121'
25+
- name: CPU
26+
runs-on: 32-core-ubuntu
27+
torch-spec: 'torch --index-url https://download.pytorch.org/whl/cpu'
28+
- name: Nightly CPU
29+
runs-on: 32-core-ubuntu
30+
torch-spec: '--pre torch --index-url https://download.pytorch.org/whl/nightly/cpu'
31+
runs-on: ${{ matrix.runs-on }}
1432
steps:
1533
- uses: actions/checkout@v2
1634

1735
- name: Set up Python
1836
uses: actions/setup-python@v2
1937
with:
20-
python-version: 3.9
38+
python-version: '3.9'
2139

2240
- name: Install dependencies
2341
run: |
2442
python -m pip install --upgrade pip
25-
pip install torch==2.2.2
26-
pip install -r requirements.txt
27-
pip install -r dev-requirements.txt
28-
29-
- name: Install package
30-
run: |
31-
pip install .
32-
33-
- name: Run tests
34-
run: |
35-
pytest test --verbose -s -x
36-
37-
test-cuda-2-3-rc:
38-
runs-on: 4-core-ubuntu-gpu-t4
39-
steps:
40-
- uses: actions/checkout@v2
41-
42-
- name: Set up Python
43-
uses: actions/setup-python@v2
44-
with:
45-
python-version: 3.9
46-
47-
- name: Install dependencies
48-
run: |
49-
python -m pip install --upgrade pip
50-
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
51-
pip install -r requirements.txt
52-
pip install -r dev-requirements.txt
53-
54-
test-cuda-nightly:
55-
runs-on: 4-core-ubuntu-gpu-t4
56-
steps:
57-
- uses: actions/checkout@v2
58-
59-
- name: Set up Python
60-
uses: actions/setup-python@v2
61-
with:
62-
python-version: 3.9
63-
64-
- name: Install dependencies
65-
run: |
66-
python -m pip install --upgrade pip
67-
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cu121
68-
pip install -r requirements.txt
69-
pip install -r dev-requirements.txt
70-
71-
72-
- name: Install package
73-
run: |
74-
pip install .
75-
76-
- name: Run tests
77-
run: |
78-
pytest test --verbose -s -x
79-
80-
test-cpu:
81-
runs-on: 32-core-ubuntu
82-
steps:
83-
- uses: actions/checkout@v2
84-
85-
- name: Set up Python
86-
uses: actions/setup-python@v2
87-
with:
88-
python-version: 3.9
89-
90-
- name: Install dependencies
91-
run: |
92-
python -m pip install --upgrade pip
93-
pip install torch --index-url https://download.pytorch.org/whl/cpu
94-
pip install -r requirements.txt
95-
pip install -r dev-requirements.txt
96-
97-
98-
- name: Install package
99-
run: |
100-
pip install .
101-
102-
- name: Run tests
103-
run: |
104-
pytest test --verbose -s -x
105-
106-
test-nightly-cpu:
107-
runs-on: 32-core-ubuntu
108-
steps:
109-
- uses: actions/checkout@v2
110-
111-
- name: Set up Python
112-
uses: actions/setup-python@v2
113-
with:
114-
python-version: 3.9
115-
116-
- name: Install dependencies
117-
run: |
118-
python -m pip install --upgrade pip
119-
pip install --pre torch --index-url https://download.pytorch.org/whl/nightly/cpu
43+
pip install ${{ matrix.torch-spec }}
12044
pip install -r requirements.txt
12145
pip install -r dev-requirements.txt
12246

0 commit comments

Comments
 (0)