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
fb60c309
Unverified
Commit
fb60c309
authored
May 31, 2021
by
Philip May
Committed by
GitHub
May 31, 2021
Browse files
fix assert (#11935)
parent
04a9709c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tests/test_tokenization_deberta_v2.py
tests/test_tokenization_deberta_v2.py
+5
-4
No files found.
tests/test_tokenization_deberta_v2.py
View file @
fb60c309
...
@@ -102,10 +102,11 @@ class DebertaV2TokenizationTest(TokenizerTesterMixin, unittest.TestCase):
...
@@ -102,10 +102,11 @@ class DebertaV2TokenizationTest(TokenizerTesterMixin, unittest.TestCase):
encoded_sentence
=
tokenizer
.
build_inputs_with_special_tokens
(
text
)
encoded_sentence
=
tokenizer
.
build_inputs_with_special_tokens
(
text
)
encoded_pair
=
tokenizer
.
build_inputs_with_special_tokens
(
text
,
text_2
)
encoded_pair
=
tokenizer
.
build_inputs_with_special_tokens
(
text
,
text_2
)
assert
encoded_sentence
==
[
tokenizer
.
cls_token_id
]
+
text
+
[
tokenizer
.
sep_token_id
]
self
.
assertEqual
([
tokenizer
.
cls_token_id
]
+
text
+
[
tokenizer
.
sep_token_id
],
encoded_sentence
)
assert
encoded_pair
==
[
tokenizer
.
cls_token_id
]
+
text
+
[
tokenizer
.
sep_token_id
]
+
text_2
+
[
self
.
assertEqual
(
tokenizer
.
sep_token_id
[
tokenizer
.
cls_token_id
]
+
text
+
[
tokenizer
.
sep_token_id
]
+
text_2
+
[
tokenizer
.
sep_token_id
],
]
encoded_pair
,
)
def
test_tokenizer_integration
(
self
):
def
test_tokenizer_integration
(
self
):
tokenizer_classes
=
[
self
.
tokenizer_class
]
tokenizer_classes
=
[
self
.
tokenizer_class
]
...
...
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