Update for changes in tokenizers API
This commit is contained in:
@@ -583,12 +583,14 @@ class BertTokenizerFast(FastPreTrainedTokenizer):
|
||||
)
|
||||
)
|
||||
if max_length is not None:
|
||||
self._tokenizer.with_truncation(max_length, stride, truncation_strategy)
|
||||
self._tokenizer.with_truncation(max_length,
|
||||
stride=stride,
|
||||
strategy=truncation_strategy)
|
||||
self._tokenizer.with_padding(
|
||||
max_length if pad_to_max_length else None,
|
||||
self.padding_side,
|
||||
self.pad_token_id,
|
||||
self.pad_token_type_id,
|
||||
self.pad_token,
|
||||
max_length=max_length if pad_to_max_length else None,
|
||||
direction=self.padding_side,
|
||||
pad_id=self.pad_token_id,
|
||||
pad_type_id=self.pad_token_type_id,
|
||||
pad_token=self.pad_token,
|
||||
)
|
||||
self._decoder = tk.decoders.WordPiece.new()
|
||||
|
||||
Reference in New Issue
Block a user