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
2d8ec5a6
Commit
2d8ec5a6
authored
Sep 06, 2019
by
LysandreJik
Browse files
Changed warning to be more explicit
Co-authored by: julien_c <chaumond@gmail.com>
parent
75635072
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
pytorch_transformers/tokenization_utils.py
pytorch_transformers/tokenization_utils.py
+1
-1
No files found.
pytorch_transformers/tokenization_utils.py
View file @
2d8ec5a6
...
@@ -691,7 +691,7 @@ class PreTrainedTokenizer(object):
...
@@ -691,7 +691,7 @@ class PreTrainedTokenizer(object):
return
self
.
add_special_tokens_sentences_pair
(
first_sentence_tokens
,
second_sentence_tokens
,
output_mask
)
return
self
.
add_special_tokens_sentences_pair
(
first_sentence_tokens
,
second_sentence_tokens
,
output_mask
)
else
:
else
:
if
output_mask
:
if
output_mask
:
logger
.
warning
(
"Can't output mask if
no special tokens are involved. Please call the method with add_special_tokens set to True
."
)
logger
.
warning
(
"Can't output mask if
you're not joining two sequences
."
)
return
first_sentence_tokens
,
second_sentence_tokens
return
first_sentence_tokens
,
second_sentence_tokens
def
add_special_tokens_single_sentence
(
self
,
token_ids
):
def
add_special_tokens_single_sentence
(
self
,
token_ids
):
...
...
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