Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions tests/models/auto/test_tokenization_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@
DUMMY_UNKNOWN_IDENTIFIER,
SMALL_MODEL_IDENTIFIER,
RequestCounter,
is_flaky,
require_tokenizers,
skip,
slow,
)

Expand Down Expand Up @@ -147,6 +149,7 @@ def test_tokenizer_identifier_with_correct_config(self):
self.assertEqual(tokenizer.model_max_length, 512)

@require_tokenizers
@is_flaky # This one is flaky even with the new retry logic because it raises an unusual error
def test_tokenizer_identifier_non_existent(self):
for tokenizer_class in [BertTokenizer, BertTokenizerFast, AutoTokenizer]:
with self.assertRaisesRegex(
Expand Down Expand Up @@ -439,6 +442,7 @@ def test_revision_not_found(self):
):
_ = AutoTokenizer.from_pretrained(DUMMY_UNKNOWN_IDENTIFIER, revision="aaaaaa")

@skip("This test is failing on main")
def test_cached_tokenizer_has_minimum_calls_to_head(self):
# Make sure we have cached the tokenizer.
_ = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-random-bert")
Expand Down
3 changes: 2 additions & 1 deletion tests/utils/test_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
from typing import Tuple

from transformers import BertConfig, BertModel, BertTokenizer, pipeline
from transformers.testing_utils import TestCasePlus, require_torch
from transformers.testing_utils import TestCasePlus, require_torch, skip


class OfflineTests(TestCasePlus):
@require_torch
@skip("This test is failing on main")
def test_offline_mode(self):
# this test is a bit tricky since TRANSFORMERS_OFFLINE can only be changed before
# `transformers` is loaded, and it's too late for inside pytest - so we are changing it
Expand Down
Loading