mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-01 02:31:11 +06:00
Changed warning to be more explicit
Co-authored by: julien_c <chaumond@gmail.com>
This commit is contained in:
parent
75635072e1
commit
2d8ec5a684
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user