Use lru_cache for tokenization tests (#36818)

* fix

* fix

* fix

* fix

---------

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2025-03-28 15:09:35 +01:00
committed by GitHub
parent 3af425d4c6
commit 1fcaad6df9
92 changed files with 1301 additions and 884 deletions

View File

@@ -17,11 +17,11 @@
from transformers import DistilBertTokenizer, DistilBertTokenizerFast
from transformers.testing_utils import require_tokenizers, slow
from ..bert.test_tokenization_bert import BertTokenizationTest
from ..bert import test_tokenization_bert
@require_tokenizers
class DistilBertTokenizationTest(BertTokenizationTest):
class DistilBertTokenizationTest(test_tokenization_bert.BertTokenizationTest):
tokenizer_class = DistilBertTokenizer
rust_tokenizer_class = DistilBertTokenizerFast
test_rust_tokenizer = True