Skip to content

Commit

Permalink
mypy fixes for BertTokenizerFast attributes (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeMe authored Mar 19, 2023
1 parent 9180303 commit 5fd5f0e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions curated_transformers/tokenization/hf_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ def _convert_wordpiece_encoder(
for piece, idx in tokenizer.vocab.items(): # type: ignore
vocab[idx] = piece

strip_accents = tokenizer.backend_tokenizer.normalizer.strip_accents
lowercase = tokenizer.do_lower_case
strip_accents = tokenizer.backend_tokenizer.normalizer.strip_accents # type: ignore
lowercase = tokenizer.do_lower_case # type: ignore
model.attrs["wordpiece_processor"] = WordPieceProcessor(vocab)
model.attrs["bos_piece"] = tokenizer.cls_token # type: ignore
model.attrs["eos_piece"] = tokenizer.sep_token # type: ignore
Expand Down

0 comments on commit 5fd5f0e

Please sign in to comment.