@@ -177,7 +177,9 @@ def to_dict(self):
177177 "command" : f"TESTS=$(circleci tests split --split-by=timings { self .job_name } _test_list.txt) && echo $TESTS > splitted_tests.txt && echo $TESTS | tr ' ' '\n '" if self .parallelism else f"awk '{{printf \" %s \" , $0}}' { self .job_name } _test_list.txt > splitted_tests.txt"
178178 }
179179 },
180- {"run" : {"name" : "fetch hub objects before pytest" , "command" : "python3 utils/fetch_hub_objects_for_ci.py" }},
180+ # During the CircleCI docker images build time, we might already (or not) download the data.
181+ # If it's done already, the files are inside the directory `/test_data/`.
182+ {"run" : {"name" : "fetch hub objects before pytest" , "command" : "cp -r /test_data/* . 2>/dev/null || true; python3 utils/fetch_hub_objects_for_ci.py" }},
181183 {"run" : {
182184 "name" : "Run tests" ,
183185 "command" : f"({ timeout_cmd } python3 -m pytest { marker_cmd } -n { self .pytest_num_workers } { junit_flags } { repeat_on_failure_flags } { ' ' .join (pytest_flags )} $(cat splitted_tests.txt) | tee tests_output.txt)" }
@@ -262,7 +264,6 @@ def job_name(self):
262264 docker_image = [{"image" : "huggingface/transformers-custom-tokenizers" }],
263265)
264266
265-
266267examples_torch_job = CircleCIJob (
267268 "examples_torch" ,
268269 additional_env = {"OMP_NUM_THREADS" : 8 },
@@ -286,35 +287,20 @@ def job_name(self):
286287 resource_class = "medium" ,
287288)
288289
289-
290- onnx_job = CircleCIJob (
291- "onnx" ,
292- docker_image = [{"image" :"huggingface/transformers-torch-tf-light" }],
293- install_steps = [
294- "uv pip install .[testing,sentencepiece,onnxruntime,vision,rjieba]" ,
295- ],
296- pytest_options = {"k onnx" : None },
297- pytest_num_workers = 1 ,
298- resource_class = "small" ,
299- )
300-
301-
302290exotic_models_job = CircleCIJob (
303291 "exotic_models" ,
304292 docker_image = [{"image" :"huggingface/transformers-exotic-models" }],
305293 parallelism = 4 ,
306294 pytest_options = {"durations" : 100 },
307295)
308296
309-
310297repo_utils_job = CircleCIJob (
311298 "repo_utils" ,
312299 docker_image = [{"image" :"huggingface/transformers-consistency" }],
313300 pytest_num_workers = 4 ,
314301 resource_class = "large" ,
315302)
316303
317-
318304non_model_job = CircleCIJob (
319305 "non_model" ,
320306 docker_image = [{"image" : "huggingface/transformers-torch-light" }],
@@ -350,7 +336,7 @@ def job_name(self):
350336 pytest_num_workers = 1 ,
351337)
352338
353- REGULAR_TESTS = [torch_job , hub_job , onnx_job , tokenization_job , processor_job , generate_job , non_model_job ] # fmt: skip
339+ REGULAR_TESTS = [torch_job , hub_job , tokenization_job , processor_job , generate_job , non_model_job ] # fmt: skip
354340EXAMPLES_TESTS = [examples_torch_job ]
355341PIPELINE_TESTS = [pipelines_torch_job ]
356342REPO_UTIL_TESTS = [repo_utils_job ]
0 commit comments