Debian Codegraph @

.github/workflows/run_merge_tests.yml

raw
1 name: Self-hosted runner tests (push to "main")
2
3 on:
4 workflow_call:
5 workflow_dispatch:
6
7 env:
8 TESTING_MOCKED_DATALOADERS: "1"
9 IS_GITHUB_CI: "1"
10
11 jobs:
12 run_core_tests_single_gpu:
13 runs-on:
14 group: aws-g6-4xlarge-plus
15 env:
16 CUDA_VISIBLE_DEVICES: "0"
17 container:
18 image: huggingface/accelerate:gpu-nightly
19 options: --gpus all --shm-size "16gb"
20 defaults:
21 run:
22 shell: bash
23 steps:
24 - name: Install accelerate
25 run: |
26 source activate accelerate;
27 git clone https://github.com/huggingface/accelerate;
28 cd accelerate;
29 git checkout ${{ github.sha }};
30 pip install -e .[testing,test_trackers] -U;
31 pip install pytest-reportlog tabulate ;
32
33 - name: Show installed libraries
34 run: |
35 source activate accelerate;
36 pip freeze
37
38 - name: Run CLI tests (use make cli)
39 working-directory: accelerate
40 run: |
41 source activate accelerate;
42 make test_cli
43
44 - name: Run test on GPUs
45 working-directory: accelerate
46 if: always()
47 run: |
48 source activate accelerate;
49 make test
50 - name: Run examples on GPUs
51 working-directory: accelerate
52 if: always()
53 run: |
54 source activate accelerate;
55 make test_examples
56
57 - name: Generate Report
58 working-directory: accelerate
59 if: always()
60 run: |
61 pip install tabulate;
62 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
63
64 run_deepspeed_tests_single_gpu:
65 runs-on:
66 group: aws-g6-4xlarge-plus
67 env:
68 CUDA_VISIBLE_DEVICES: "0"
69 container:
70 image: huggingface/accelerate:gpu-deepspeed-nightly
71 options: --gpus all --shm-size "16gb"
72 defaults:
73 run:
74 shell: bash
75 steps:
76 - name: Install accelerate
77 run: |
78 source activate accelerate;
79 git clone https://github.com/huggingface/accelerate;
80 cd accelerate;
81 git checkout ${{ github.sha }};
82 pip install -e .[testing,test_trackers] -U;
83 pip install pytest-reportlog tabulate ;
84
85 - name: Show installed libraries
86 run: |
87 source activate accelerate;
88 pip freeze
89
90 - name: Run test on GPUs
91 working-directory: accelerate
92 if: always()
93 run: |
94 source activate accelerate;
95 make test_deepspeed
96
97 - name: Generate Report
98 working-directory: accelerate
99 if: always()
100 run: |
101 pip install tabulate;
102 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
103
104 run_core_tests_multi_gpu:
105 runs-on:
106 group: aws-g6-12xlarge-plus
107 env:
108 CUDA_VISIBLE_DEVICES: 0,1
109 container:
110 image: huggingface/accelerate:gpu-nightly
111 options: --gpus all --shm-size "16gb"
112 defaults:
113 run:
114 shell: bash
115 steps:
116 - name: Update clone
117 run: |
118 source activate accelerate;
119 git clone https://github.com/huggingface/accelerate;
120 cd accelerate;
121 git checkout ${{ github.sha }};
122 pip install -e .[testing,test_trackers] -U;
123 pip install pytest-reportlog tabulate
124
125 - name: Show installed libraries
126 run: |
127 source activate accelerate;
128 pip freeze
129
130 - name: Run test on GPUs
131 working-directory: accelerate
132 run: |
133 source activate accelerate;
134 make test
135
136 - name: Run examples on GPUs
137 working-directory: accelerate
138 if: always()
139 run: |
140 source activate accelerate;
141 make test_examples
142
143 - name: Generate Report
144 working-directory: accelerate
145 if: always()
146 run: |
147 source activate accelerate;
148 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
149
150 run_deepspeed_tests_multi_gpu:
151 runs-on:
152 group: aws-g6-12xlarge-plus
153 container:
154 image: huggingface/accelerate:gpu-deepspeed-nightly
155 options: --gpus all --shm-size "16gb"
156 defaults:
157 run:
158 shell: bash
159 steps:
160 - name: Install accelerate
161 run: |
162 source activate accelerate;
163 git clone https://github.com/huggingface/accelerate;
164 cd accelerate;
165 git checkout ${{ github.sha }};
166 pip install -e .[testing,test_trackers] -U;
167 pip install pytest-reportlog tabulate ;
168
169 - name: Show installed libraries
170 run: |
171 source activate accelerate;
172 pip freeze
173
174 - name: Run test on GPUs
175 working-directory: accelerate
176 if: always()
177 run: |
178 source activate accelerate;
179 make test_deepspeed
180
181 - name: Generate Report
182 working-directory: accelerate
183 if: always()
184 run: |
185 pip install tabulate;
186 python utils/log_reports.py >> $GITHUB_STEP_SUMMARY