When I run the code in /tutorial/basic.py:
tokenized_example = wrapped_t5tokenizer.tokenize_one_example(wrapped_example, teacher_forcing=False)
There is an AttributeError:
/usr/local/lib/python3.7/dist-packages/openprompt/plms/seq2seq.py in tokenize_one_example(self, wrapped_example, teacher_forcing)
89 encode_text = [0] # can be replace by any token, since these token will use their own embeddings
90 else:
---> 91 encode_text = self.tokenizer.encode(piece['text'], add_special_tokens=False)
92
93 encoding_length = len(encode_text)
AttributeError: 'NoneType' object has no attribute 'encode'
Could you tell me how to fix this problem?
When I run the code in /tutorial/basic.py:
tokenized_example = wrapped_t5tokenizer.tokenize_one_example(wrapped_example, teacher_forcing=False)
There is an AttributeError:
/usr/local/lib/python3.7/dist-packages/openprompt/plms/seq2seq.py in tokenize_one_example(self, wrapped_example, teacher_forcing)
89 encode_text = [0] # can be replace by any token, since these token will use their own embeddings
90 else:
---> 91 encode_text = self.tokenizer.encode(piece['text'], add_special_tokens=False)
92
93 encoding_length = len(encode_text)
AttributeError: 'NoneType' object has no attribute 'encode'
Could you tell me how to fix this problem?