"...composable_kernel.git" did not exist on "2f88070afc0841e2506cae37fe03c9fe00aa7155"
Unverified Commit 83dc5762 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Skip a tapas (tokenization) test in past CI (#24378)



fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 297d769d
...@@ -22,7 +22,7 @@ from typing import List ...@@ -22,7 +22,7 @@ from typing import List
import numpy as np import numpy as np
import pandas as pd import pandas as pd
from transformers import AddedToken from transformers import AddedToken, is_torch_available
from transformers.models.tapas.tokenization_tapas import ( from transformers.models.tapas.tokenization_tapas import (
VOCAB_FILES_NAMES, VOCAB_FILES_NAMES,
BasicTokenizer, BasicTokenizer,
...@@ -44,6 +44,12 @@ from transformers.testing_utils import ( ...@@ -44,6 +44,12 @@ from transformers.testing_utils import (
from ...test_tokenization_common import TokenizerTesterMixin, filter_non_english, merge_model_tokenizer_mappings from ...test_tokenization_common import TokenizerTesterMixin, filter_non_english, merge_model_tokenizer_mappings
if is_torch_available():
from transformers.pytorch_utils import is_torch_greater_or_equal_than_1_12
else:
is_torch_greater_or_equal_than_1_12 = False
@require_tokenizers @require_tokenizers
@require_pandas @require_pandas
class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase): class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
...@@ -1026,6 +1032,7 @@ class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase): ...@@ -1026,6 +1032,7 @@ class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
# Do the same test as modeling common. # Do the same test as modeling common.
self.assertIn(0, output["token_type_ids"][0]) self.assertIn(0, output["token_type_ids"][0])
@unittest.skipIf(not is_torch_greater_or_equal_than_1_12, reason="Tapas is only available in torch v1.12+")
@require_torch @require_torch
@slow @slow
def test_torch_encode_plus_sent_to_model(self): def test_torch_encode_plus_sent_to_model(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment