Skip to content

Commit

Permalink
remove unnecessary assertNotEqual from t5 (and siglip), add copied from)
Browse files Browse the repository at this point in the history
  • Loading branch information
itazap committed Aug 26, 2024
1 parent 8ba6e0b commit bf4f6db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions tests/models/siglip/test_tokenization_siglip.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def test_tokenizer_integration(self):
input_ids = tokenizer(text, padding="max_length").input_ids
self.assertListEqual(input_ids, expected)

# Copied from tests.models.t5.test_tokenization_t5.T5TokenizationTest.test_some_edge_cases with T5->Siglip
def test_some_edge_cases(self):
tokenizer = SiglipTokenizer.from_pretrained("google/siglip-base-patch16-224", legacy=False)

Expand Down
1 change: 0 additions & 1 deletion tests/models/t5/test_tokenization_t5.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ def test_some_edge_cases(self):
sp_tokens = tokenizer.sp_model.encode("</s>>", out_type=str)
self.assertEqual(sp_tokens, ["<", "/", "s", ">", ">"])
tokens = tokenizer.tokenize("</s>>")
self.assertNotEqual(sp_tokens, tokens)
self.assertEqual(tokens, ["</s>", ">"])

tokens = tokenizer.tokenize("")
Expand Down

0 comments on commit bf4f6db

Please sign in to comment.