From 063bef0865863ef86dc74011f4bc715b19d03cc9 Mon Sep 17 00:00:00 2001 From: Matt Date: Wed, 11 Jun 2025 16:03:31 +0100 Subject: [PATCH] Prepare for TF+Jax deprecation (#38760) * Prepare for TF+Jax deprecation * Remove .circleci jobs --- .circleci/create_circleci_config.py | 37 +---------------------------- utils/check_repo.py | 4 +++- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/.circleci/create_circleci_config.py b/.circleci/create_circleci_config.py index 058afd029a..7d820f3dbe 100644 --- a/.circleci/create_circleci_config.py +++ b/.circleci/create_circleci_config.py @@ -230,22 +230,6 @@ processor_job = CircleCIJob( parallelism=8, ) -tf_job = CircleCIJob( - "tf", - docker_image=[{"image":"huggingface/transformers-tf-light"}], - parallelism=6, -) - - -flax_job = CircleCIJob( - "flax", - docker_image=[{"image":"huggingface/transformers-jax-light"}], - parallelism=6, - pytest_num_workers=16, - resource_class="2xlarge", -) - - pipelines_torch_job = CircleCIJob( "pipelines_torch", additional_env={"RUN_PIPELINE_TESTS": True}, @@ -254,16 +238,6 @@ pipelines_torch_job = CircleCIJob( parallelism=4, ) - -pipelines_tf_job = CircleCIJob( - "pipelines_tf", - additional_env={"RUN_PIPELINE_TESTS": True}, - docker_image=[{"image":"huggingface/transformers-tf-light"}], - marker="is_pipeline_test", - parallelism=4, -) - - custom_tokenizers_job = CircleCIJob( "custom_tokenizers", additional_env={"RUN_CUSTOM_TOKENIZERS": True}, @@ -280,15 +254,6 @@ examples_torch_job = CircleCIJob( pytest_num_workers=4, ) - -examples_tensorflow_job = CircleCIJob( - "examples_tensorflow", - additional_env={"OMP_NUM_THREADS": 8}, - docker_image=[{"image":"huggingface/transformers-examples-tf"}], - pytest_num_workers=2, -) - - hub_job = CircleCIJob( "hub", additional_env={"HUGGINGFACE_CO_STAGING": True}, @@ -368,7 +333,7 @@ doc_test_job = CircleCIJob( pytest_num_workers=1, ) -REGULAR_TESTS = [torch_job, flax_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job, non_model_job] # fmt: skip +REGULAR_TESTS = [torch_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job, non_model_job] # fmt: skip EXAMPLES_TESTS = [examples_torch_job] PIPELINE_TESTS = [pipelines_torch_job] REPO_UTIL_TESTS = [repo_utils_job] diff --git a/utils/check_repo.py b/utils/check_repo.py index 58a79cb289..a1c5320a5d 100644 --- a/utils/check_repo.py +++ b/utils/check_repo.py @@ -682,7 +682,9 @@ def check_all_models_are_tested(): # Matches a module to its test file. test_file = [file for file in test_files if f"test_{module.__name__.split('.')[-1]}.py" in file] if len(test_file) == 0: - failures.append(f"{module.__name__} does not have its corresponding test file {test_file}.") + # We do not test TF or Flax models anymore because they're deprecated. + if not (module.__name__.startswith("modeling_tf") or module.__name__.startswith("modeling_flax")): + failures.append(f"{module.__name__} does not have its corresponding test file {test_file}.") elif len(test_file) > 1: failures.append(f"{module.__name__} has several test files: {test_file}.") else: