3
3
gcp-gke :
circleci/[email protected]
4
4
5
5
6
-
7
6
# TPU REFERENCES
8
7
references :
9
8
checkout_ml_testing : &checkout_ml_testing
69
68
- image : circleci/python:3.6
70
69
environment :
71
70
OMP_NUM_THREADS : 1
71
+ RUN_PT_TF_CROSS_TESTS : yes
72
+ TRANSFORMERS_IS_CI : yes
72
73
resource_class : xlarge
73
74
parallelism : 1
74
75
steps :
@@ -79,13 +80,43 @@ jobs:
79
80
- v0.4-{{ checksum "setup.py" }}
80
81
- run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
81
82
- run : pip install --upgrade pip
82
- - run : pip install .[sklearn,tf-cpu,torch,testing,sentencepiece,speech]
83
- - run : pip install tapas torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
83
+ - run : pip install .[sklearn,tf-cpu,torch,testing,sentencepiece,speech,vision]
84
+ - run : pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
85
+ - save_cache :
86
+ key : v0.4-{{ checksum "setup.py" }}
87
+ paths :
88
+ - ' ~/.cache/pip'
89
+ - run : python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_torch_and_tf ./tests/ -m is_pt_tf_cross_test --durations=0 | tee tests_output.txt
90
+ - store_artifacts :
91
+ path : ~/transformers/tests_output.txt
92
+ - store_artifacts :
93
+ path : ~/transformers/reports
94
+
95
+ run_tests_torch_and_flax :
96
+ working_directory : ~/transformers
97
+ docker :
98
+ - image : circleci/python:3.6
99
+ environment :
100
+ OMP_NUM_THREADS : 1
101
+ RUN_PT_FLAX_CROSS_TESTS : yes
102
+ TRANSFORMERS_IS_CI : yes
103
+ resource_class : xlarge
104
+ parallelism : 1
105
+ steps :
106
+ - checkout
107
+ - restore_cache :
108
+ keys :
109
+ - v0.4-torch_and_flax-{{ checksum "setup.py" }}
110
+ - v0.4-{{ checksum "setup.py" }}
111
+ - run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
112
+ - run : pip install --upgrade pip
113
+ - run : pip install .[sklearn,flax,torch,testing,sentencepiece,speech,vision]
114
+ - run : pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
84
115
- save_cache :
85
116
key : v0.4-{{ checksum "setup.py" }}
86
117
paths :
87
118
- ' ~/.cache/pip'
88
- - run : RUN_PT_TF_CROSS_TESTS=1 python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_torch_and_tf ./tests/ -m is_pt_tf_cross_test --durations=0 | tee tests_output.txt
119
+ - run : python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_torch_and_flax ./tests/ -m is_pt_flax_cross_test --durations=0 | tee tests_output.txt
89
120
- store_artifacts :
90
121
path : ~/transformers/tests_output.txt
91
122
- store_artifacts :
97
128
- image : circleci/python:3.7
98
129
environment :
99
130
OMP_NUM_THREADS : 1
131
+ TRANSFORMERS_IS_CI : yes
100
132
resource_class : xlarge
101
133
parallelism : 1
102
134
steps :
@@ -107,13 +139,13 @@ jobs:
107
139
- v0.4-{{ checksum "setup.py" }}
108
140
- run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
109
141
- run : pip install --upgrade pip
110
- - run : pip install .[sklearn,torch,testing,sentencepiece,speech]
111
- - run : pip install tapas torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
142
+ - run : pip install .[sklearn,torch,testing,sentencepiece,speech,vision ]
143
+ - run : pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
112
144
- save_cache :
113
145
key : v0.4-torch-{{ checksum "setup.py" }}
114
146
paths :
115
147
- ' ~/.cache/pip'
116
- - run : python -m pytest -n 8 --dist=loadfile -s --make-reports=tests_torch ./tests/ | tee tests_output.txt
148
+ - run : python -m pytest -n 4 --dist=loadfile -s --make-reports=tests_torch ./tests/ | tee tests_output.txt
117
149
- store_artifacts :
118
150
path : ~/transformers/tests_output.txt
119
151
- store_artifacts :
@@ -125,6 +157,7 @@ jobs:
125
157
- image : circleci/python:3.7
126
158
environment :
127
159
OMP_NUM_THREADS : 1
160
+ TRANSFORMERS_IS_CI : yes
128
161
resource_class : xlarge
129
162
parallelism : 1
130
163
steps :
@@ -151,6 +184,7 @@ jobs:
151
184
- image : circleci/python:3.7
152
185
environment :
153
186
OMP_NUM_THREADS : 1
187
+ TRANSFORMERS_IS_CI : yes
154
188
resource_class : xlarge
155
189
parallelism : 1
156
190
steps :
@@ -159,9 +193,8 @@ jobs:
159
193
keys :
160
194
- v0.4-flax-{{ checksum "setup.py" }}
161
195
- v0.4-{{ checksum "setup.py" }}
162
- - run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
163
196
- run : pip install --upgrade pip
164
- - run : sudo pip install .[flax,sklearn,torch, testing,sentencepiece,speech ]
197
+ - run : sudo pip install .[flax,testing,sentencepiece]
165
198
- save_cache :
166
199
key : v0.4-flax-{{ checksum "setup.py" }}
167
200
paths :
@@ -178,6 +211,8 @@ jobs:
178
211
- image : circleci/python:3.7
179
212
environment :
180
213
OMP_NUM_THREADS : 1
214
+ RUN_PIPELINE_TESTS : yes
215
+ TRANSFORMERS_IS_CI : yes
181
216
resource_class : xlarge
182
217
parallelism : 1
183
218
steps :
@@ -188,13 +223,13 @@ jobs:
188
223
- v0.4-{{ checksum "setup.py" }}
189
224
- run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
190
225
- run : pip install --upgrade pip
191
- - run : pip install .[sklearn,torch,testing,sentencepiece,speech]
192
- - run : pip install tapas torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
226
+ - run : pip install .[sklearn,torch,testing,sentencepiece,speech,vision ]
227
+ - run : pip install torch-scatter -f https://pytorch-geometric.com/whl/torch-1.8.0+cpu.html
193
228
- save_cache :
194
229
key : v0.4-torch-{{ checksum "setup.py" }}
195
230
paths :
196
231
- ' ~/.cache/pip'
197
- - run : RUN_PIPELINE_TESTS=1 python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_pipelines_torch -m is_pipeline_test ./tests/ | tee tests_output.txt
232
+ - run : python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_pipelines_torch -m is_pipeline_test ./tests/ | tee tests_output.txt
198
233
- store_artifacts :
199
234
path : ~/transformers/tests_output.txt
200
235
- store_artifacts :
@@ -206,6 +241,8 @@ jobs:
206
241
- image : circleci/python:3.7
207
242
environment :
208
243
OMP_NUM_THREADS : 1
244
+ RUN_PIPELINE_TESTS : yes
245
+ TRANSFORMERS_IS_CI : yes
209
246
resource_class : xlarge
210
247
parallelism : 1
211
248
steps :
@@ -220,7 +257,7 @@ jobs:
220
257
key : v0.4-tf-{{ checksum "setup.py" }}
221
258
paths :
222
259
- ' ~/.cache/pip'
223
- - run : RUN_PIPELINE_TESTS=1 python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_pipelines_tf ./tests/ -m is_pipeline_test | tee tests_output.txt
260
+ - run : python -m pytest -n 8 --dist=loadfile -rA -s --make-reports=tests_pipelines_tf ./tests/ -m is_pipeline_test | tee tests_output.txt
224
261
- store_artifacts :
225
262
path : ~/transformers/tests_output.txt
226
263
- store_artifacts :
@@ -232,14 +269,15 @@ jobs:
232
269
- image : circleci/python:3.7
233
270
environment :
234
271
RUN_CUSTOM_TOKENIZERS : yes
272
+ TRANSFORMERS_IS_CI : yes
235
273
steps :
236
274
- checkout
237
275
- restore_cache :
238
276
keys :
239
277
- v0.4-custom_tokenizers-{{ checksum "setup.py" }}
240
278
- v0.4-{{ checksum "setup.py" }}
241
279
- run : pip install --upgrade pip
242
- - run : pip install .[ja,testing,sentencepiece]
280
+ - run : pip install .[ja,testing,sentencepiece,jieba ]
243
281
- run : python -m unidic download
244
282
- save_cache :
245
283
key : v0.4-custom_tokenizers-{{ checksum "setup.py" }}
@@ -257,6 +295,7 @@ jobs:
257
295
- image : circleci/python:3.6
258
296
environment :
259
297
OMP_NUM_THREADS : 1
298
+ TRANSFORMERS_IS_CI : yes
260
299
resource_class : xlarge
261
300
parallelism : 1
262
301
steps :
@@ -272,7 +311,7 @@ jobs:
272
311
key : v0.4-torch_examples-{{ checksum "setup.py" }}
273
312
paths :
274
313
- ' ~/.cache/pip'
275
- - run : python -m pytest -n 8 --dist=loadfile -s --make-reports=examples_torch ./examples/ | tee examples_output.txt
314
+ - run : TRANSFORMERS_IS_CI=1 python -m pytest -n 8 --dist=loadfile -s --make-reports=examples_torch ./examples/ | tee examples_output.txt
276
315
- store_artifacts :
277
316
path : ~/transformers/examples_output.txt
278
317
- store_artifacts :
@@ -282,6 +321,9 @@ jobs:
282
321
working_directory : ~/transformers
283
322
docker :
284
323
- image : circleci/python:3.7
324
+ environment :
325
+ RUN_GIT_LFS_TESTS : yes
326
+ TRANSFORMERS_IS_CI : yes
285
327
resource_class : xlarge
286
328
parallelism : 1
287
329
steps :
@@ -292,7 +334,7 @@ jobs:
292
334
git config --global user.name "ci"
293
335
- run : pip install --upgrade pip
294
336
- run : pip install .[testing]
295
- - run : RUN_GIT_LFS_TESTS=1 python -m pytest -sv ./tests/test_hf_api.py -k "HfLargefilesTest"
337
+ - run : python -m pytest -sv ./tests/test_hf_api.py -k "HfLargefilesTest"
296
338
297
339
build_doc :
298
340
working_directory : ~/transformers
@@ -306,7 +348,7 @@ jobs:
306
348
- v0.4-{{ checksum "setup.py" }}
307
349
- run : sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev
308
350
- run : pip install --upgrade pip
309
- - run : pip install ."[all, docs]"
351
+ - run : pip install ."[docs]"
310
352
- save_cache :
311
353
key : v0.4-build_doc-{{ checksum "setup.py" }}
312
354
paths :
@@ -328,7 +370,7 @@ jobs:
328
370
keys :
329
371
- v0.4-deploy_doc-{{ checksum "setup.py" }}
330
372
- v0.4-{{ checksum "setup.py" }}
331
- - run : pip install ."[all, docs]"
373
+ - run : pip install ."[docs]"
332
374
- save_cache :
333
375
key : v0.4-deploy_doc-{{ checksum "setup.py" }}
334
376
paths :
@@ -356,12 +398,14 @@ jobs:
356
398
- ' ~/.cache/pip'
357
399
- run : black --check examples tests src utils
358
400
- run : isort --check-only examples tests src utils
401
+ - run : python utils/custom_init_isort.py --check_only
359
402
- run : flake8 examples tests src utils
360
403
- run : python utils/style_doc.py src/transformers docs/source --max_len 119 --check_only
361
404
- run : python utils/check_copies.py
362
405
- run : python utils/check_table.py
363
406
- run : python utils/check_dummies.py
364
407
- run : python utils/check_repo.py
408
+ - run : python utils/check_inits.py
365
409
366
410
check_repository_consistency :
367
411
working_directory : ~/transformers
@@ -380,6 +424,7 @@ jobs:
380
424
- image : circleci/python:3.6
381
425
environment :
382
426
OMP_NUM_THREADS : 1
427
+ TRANSFORMERS_IS_CI : yes
383
428
resource_class : xlarge
384
429
parallelism : 1
385
430
steps :
@@ -418,6 +463,7 @@ workflows:
418
463
- run_examples_torch
419
464
- run_tests_custom_tokenizers
420
465
- run_tests_torch_and_tf
466
+ - run_tests_torch_and_flax
421
467
- run_tests_torch
422
468
- run_tests_tf
423
469
- run_tests_flax
0 commit comments