set `return_attention_mask=True` in tests

This commit is contained in:
Joshua Lochner 2024-03-24 23:42:45 +02:00
parent 75d7c09ae1
commit 5cbda51a76
1 changed files with 2 additions and 2 deletions

View File

@ -328,7 +328,7 @@ def generate_tokenizer_tests():
for data in TOKENIZER_TEXT_PAIR_TEST_DATA:
try:
output = tokenizer(**data).data
output = tokenizer(**data, return_attention_mask=True).data
except Exception:
# Ignore testing tokenizers which fail in the python library
continue
@ -344,7 +344,7 @@ def generate_tokenizer_tests():
# Run tokenizer on test cases
for text in shared_texts + custom_texts + custom_by_model_type_texts:
try:
encoded = tokenizer(text).data
encoded = tokenizer(text, return_attention_mask=True).data
except Exception:
# Ignore testing tokenizers which fail in the python library
continue