Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ionicsolutions committed Jun 26, 2021
1 parent 31a813c commit a057018
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transformers/data/data_collator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit a057018

Please sign in to comment.