Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
83dc5762
Unverified
Commit
83dc5762
authored
Jun 20, 2023
by
Yih-Dar
Committed by
GitHub
Jun 20, 2023
Browse files
Skip a tapas (tokenization) test in past CI (#24378)
fix Co-authored-by:
ydshieh
<
ydshieh@users.noreply.github.com
>
parent
297d769d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
tests/models/tapas/test_tokenization_tapas.py
tests/models/tapas/test_tokenization_tapas.py
+8
-1
No files found.
tests/models/tapas/test_tokenization_tapas.py
View file @
83dc5762
...
...
@@ -22,7 +22,7 @@ from typing import List
import
numpy
as
np
import
pandas
as
pd
from
transformers
import
AddedToken
from
transformers
import
AddedToken
,
is_torch_available
from
transformers.models.tapas.tokenization_tapas
import
(
VOCAB_FILES_NAMES
,
BasicTokenizer
,
...
...
@@ -44,6 +44,12 @@ from transformers.testing_utils import (
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_pandas
class
TapasTokenizationTest
(
TokenizerTesterMixin
,
unittest
.
TestCase
):
...
...
@@ -1026,6 +1032,7 @@ class TapasTokenizationTest(TokenizerTesterMixin, unittest.TestCase):
# Do the same test as modeling common.
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
@
slow
def
test_torch_encode_plus_sent_to_model
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment