From ab582f7fe1f8bf98e966d9e6da1dcfcec7f3f1a6 Mon Sep 17 00:00:00 2001 From: amyeroberts <22614925+amyeroberts@users.noreply.github.com> Date: Fri, 12 Jan 2024 11:58:59 +0000 Subject: [PATCH] Mark two logger tests as flaky (#28458) * Mark two logger tests as flaky * Add description to is_flaky --- tests/test_modeling_utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_modeling_utils.py b/tests/test_modeling_utils.py index 1f632882f02b38..398c0bd0949345 100755 --- a/tests/test_modeling_utils.py +++ b/tests/test_modeling_utils.py @@ -43,6 +43,7 @@ USER, CaptureLogger, TestCasePlus, + is_flaky, is_staging_test, require_accelerate, require_flax, @@ -288,6 +289,9 @@ def test_model_from_pretrained_hub_subfolder_sharded(self): self.assertIsNotNone(model) + @is_flaky( + description="Capturing logs is flaky: https://app.circleci.com/pipelines/github/huggingface/transformers/81004/workflows/4919e5c9-0ea2-457b-ad4f-65371f79e277/jobs/1038999" + ) def test_model_from_pretrained_with_different_pretrained_model_name(self): model = T5ForConditionalGeneration.from_pretrained(TINY_T5) self.assertIsNotNone(model) @@ -1002,6 +1006,9 @@ def test_tied_weights_reload(self): # Should only complain about the missing bias self.assertListEqual(load_info["missing_keys"], ["decoder.bias"]) + @is_flaky( + description="Capturing logs is flaky: https://app.circleci.com/pipelines/github/huggingface/transformers/81004/workflows/4919e5c9-0ea2-457b-ad4f-65371f79e277/jobs/1038999" + ) def test_unexpected_keys_warnings(self): model = ModelWithHead(PretrainedConfig()) logger = logging.get_logger("transformers.modeling_utils")