Mark two logger tests as flaky (#28458)

* Mark two logger tests as flaky

* Add description to is_flaky
This commit is contained in:
amyeroberts 2024-01-12 11:58:59 +00:00 committed by GitHub
parent 07bdbebb48
commit 4e36a6cd00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -43,6 +43,7 @@ from transformers.testing_utils import (
USER,
CaptureLogger,
TestCasePlus,
is_flaky,
is_staging_test,
require_accelerate,
require_flax,
@ -288,6 +289,9 @@ class ModelUtilsTest(TestCasePlus):
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 @@ class ModelUtilsTest(TestCasePlus):
# 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")