tokenizers icon indicating copy to clipboard operation
tokenizers copied to clipboard

AttributeError: 'BertTokenizer' object has no attribute 'tokens_trie'

Open sbrvrm99-zz opened this issue 3 years ago • 2 comments

While loading trained tokenizer from pkl file i am getting this error.

PreTrainedTokenizer(name_or_path='', vocab_size=50000, model_max_len=1000000000000000019884624838656, is_fast=False, padding_side='right', truncation_side='right', special_tokens={'unk_token': '[UNK]', 'sep_token': '[SEP]', 'pad_token': '[PAD]', 'cls_token': '[CLS]', 'mask_token': '[MASK]'})

tokenizer = pickle.loads(tf.io.gfile.GFile(tokenizer_path, 'rb').read())

AttributeError: 'BertTokenizer' object has no attribute 'tokens_trie'

sbrvrm99-zz avatar Jun 16 '22 13:06 sbrvrm99-zz

Could you maybe share some code on how to reproduce the issue starting from an existing tokenizer ?

Currently it's hard to understand what's going on.

Narsil avatar Jun 28 '22 21:06 Narsil

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Feb 15 '24 01:02 github-actions[bot]