From 2d8ec5a684806d9a0d427645dcafbdf5de17eaed Mon Sep 17 00:00:00 2001 From: LysandreJik Date: Fri, 6 Sep 2019 17:51:55 -0400 Subject: [PATCH] Changed warning to be more explicit Co-authored by: julien_c --- pytorch_transformers/tokenization_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_transformers/tokenization_utils.py b/pytorch_transformers/tokenization_utils.py index be49d7eab5..6a4f8a2dc9 100644 --- a/pytorch_transformers/tokenization_utils.py +++ b/pytorch_transformers/tokenization_utils.py @@ -691,7 +691,7 @@ class PreTrainedTokenizer(object): return self.add_special_tokens_sentences_pair(first_sentence_tokens, second_sentence_tokens, output_mask) else: 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 def add_special_tokens_single_sentence(self, token_ids):