mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-14 10:08:29 +06:00
Fix some missing tests in circleci (#33559)
* fix * fix * fix * fix * skip * skip more --------- Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
parent
77c5d59e0e
commit
077b552f07
@ -312,6 +312,15 @@ repo_utils_job = CircleCIJob(
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
non_model_job = CircleCIJob(
|
||||||
|
"non_model",
|
||||||
|
docker_image=[{"image": "huggingface/transformers-torch-light"}],
|
||||||
|
marker="not generate",
|
||||||
|
parallelism=6,
|
||||||
|
pytest_num_workers=8,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# We also include a `dummy.py` file in the files to be doc-tested to prevent edge case failure. Otherwise, the pytest
|
# We also include a `dummy.py` file in the files to be doc-tested to prevent edge case failure. Otherwise, the pytest
|
||||||
# hangs forever during test collection while showing `collecting 0 items / 21 errors`. (To see this, we have to remove
|
# hangs forever during test collection while showing `collecting 0 items / 21 errors`. (To see this, we have to remove
|
||||||
# the bash output redirection.)
|
# the bash output redirection.)
|
||||||
@ -336,7 +345,7 @@ doc_test_job = CircleCIJob(
|
|||||||
pytest_num_workers=1,
|
pytest_num_workers=1,
|
||||||
)
|
)
|
||||||
|
|
||||||
REGULAR_TESTS = [torch_and_tf_job, torch_and_flax_job, torch_job, tf_job, flax_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job] # fmt: skip
|
REGULAR_TESTS = [torch_and_tf_job, torch_and_flax_job, torch_job, tf_job, flax_job, hub_job, onnx_job, tokenization_job, processor_job, generate_job, non_model_job] # fmt: skip
|
||||||
EXAMPLES_TESTS = [examples_torch_job, examples_tensorflow_job]
|
EXAMPLES_TESTS = [examples_torch_job, examples_tensorflow_job]
|
||||||
PIPELINE_TESTS = [pipelines_torch_job, pipelines_tf_job]
|
PIPELINE_TESTS = [pipelines_torch_job, pipelines_tf_job]
|
||||||
REPO_UTIL_TESTS = [repo_utils_job]
|
REPO_UTIL_TESTS = [repo_utils_job]
|
||||||
|
@ -114,6 +114,10 @@ class GenerationConfigTest(unittest.TestCase):
|
|||||||
# `.update()` returns a dictionary of unused kwargs
|
# `.update()` returns a dictionary of unused kwargs
|
||||||
self.assertEqual(unused_kwargs, {"foo": "bar"})
|
self.assertEqual(unused_kwargs, {"foo": "bar"})
|
||||||
|
|
||||||
|
# TODO: @Arthur and/or @Joao
|
||||||
|
# FAILED tests/generation/test_configuration_utils.py::GenerationConfigTest::test_initialize_new_kwargs - AttributeError: 'GenerationConfig' object has no attribute 'get_text_config'
|
||||||
|
# See: https://app.circleci.com/pipelines/github/huggingface/transformers/104831/workflows/e5e61514-51b7-4c8c-bba7-3c4d2986956e/jobs/1394252
|
||||||
|
@unittest.skip("failed with `'GenerationConfig' object has no attribute 'get_text_config'`")
|
||||||
def test_initialize_new_kwargs(self):
|
def test_initialize_new_kwargs(self):
|
||||||
generation_config = GenerationConfig()
|
generation_config = GenerationConfig()
|
||||||
generation_config.foo = "bar"
|
generation_config.foo = "bar"
|
||||||
|
@ -36,6 +36,9 @@ class TestImportStructures(unittest.TestCase):
|
|||||||
models_path = base_transformers_path / "src" / "transformers" / "models"
|
models_path = base_transformers_path / "src" / "transformers" / "models"
|
||||||
models_import_structure = spread_import_structure(define_import_structure(models_path))
|
models_import_structure = spread_import_structure(define_import_structure(models_path))
|
||||||
|
|
||||||
|
# TODO: Lysandre
|
||||||
|
# See https://app.circleci.com/pipelines/github/huggingface/transformers/104762/workflows/7ba9c6f7-a3b2-44e6-8eaf-749c7b7261f7/jobs/1393260/tests
|
||||||
|
@unittest.skip(reason="failing")
|
||||||
def test_definition(self):
|
def test_definition(self):
|
||||||
import_structure = define_import_structure(import_structures)
|
import_structure = define_import_structure(import_structures)
|
||||||
import_structure_definition = {
|
import_structure_definition = {
|
||||||
@ -93,6 +96,9 @@ class TestImportStructures(unittest.TestCase):
|
|||||||
)
|
)
|
||||||
self.assertListEqual(sorted(objects), sorted(_all), msg=error_message)
|
self.assertListEqual(sorted(objects), sorted(_all), msg=error_message)
|
||||||
|
|
||||||
|
# TODO: Lysandre
|
||||||
|
# See https://app.circleci.com/pipelines/github/huggingface/transformers/104762/workflows/7ba9c6f7-a3b2-44e6-8eaf-749c7b7261f7/jobs/1393260/tests
|
||||||
|
@unittest.skip(reason="failing")
|
||||||
def test_export_backend_should_be_defined(self):
|
def test_export_backend_should_be_defined(self):
|
||||||
with self.assertRaisesRegex(ValueError, "Backend should be defined in the BACKENDS_MAPPING"):
|
with self.assertRaisesRegex(ValueError, "Backend should be defined in the BACKENDS_MAPPING"):
|
||||||
pass
|
pass
|
||||||
|
@ -1148,6 +1148,7 @@ JOB_TO_TEST_FILE = {
|
|||||||
"pipelines_torch": r"tests/models/.*/test_modeling_(?!(?:flax_|tf_)).*",
|
"pipelines_torch": r"tests/models/.*/test_modeling_(?!(?:flax_|tf_)).*",
|
||||||
"tests_hub": r"tests/.*",
|
"tests_hub": r"tests/.*",
|
||||||
"tests_onnx": r"tests/models/.*/test_modeling_(?:tf_|(?!flax)).*",
|
"tests_onnx": r"tests/models/.*/test_modeling_(?:tf_|(?!flax)).*",
|
||||||
|
"tests_non_model": r"tests/[^/]*?/test_.*\.py",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user