Skip to content

Commit

Permalink
Mark two logger tests as flaky (#28458)
Browse files Browse the repository at this point in the history
* Mark two logger tests as flaky

* Add description to is_flaky
  • Loading branch information
amyeroberts authored Jan 12, 2024
1 parent 07bdbeb commit 4e36a6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test_modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
USER,
CaptureLogger,
TestCasePlus,
is_flaky,
is_staging_test,
require_accelerate,
require_flax,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 4e36a6c

Please sign in to comment.