diff --git a/src/transformers/data/data_collator.py b/src/transformers/data/data_collator.py index b7dc4346d2c24a..3279117e6dfe94 100644 --- a/src/transformers/data/data_collator.py +++ b/src/transformers/data/data_collator.py @@ -445,8 +445,10 @@ def _whole_word_mask(self, input_tokens: List[str], max_predictions=512): Get 0/1 labels for masked tokens with whole word mask proxy """ if not isinstance(self.tokenizer, (BertTokenizer, BertTokenizerFast)): - warnings.warn("DataCollatorForWholeWordMask is only suitable for BertTokenizer-like tokenizers." - "Please refer to the documentation for more information.") + warnings.warn( + "DataCollatorForWholeWordMask is only suitable for BertTokenizer-like tokenizers." + "Please refer to the documentation for more information." + ) cand_indexes = [] for (i, token) in enumerate(input_tokens):