OpenPrompt
OpenPrompt copied to clipboard
error while using "wrapped_tokenizer.tokenize_one_example"
wrapped_tokenizer is a "WrapperClass" object I defined. When I run "wrapped_tokenizer.tokenize_one_example" I meet with an error at 48th line in mlm.py: if piece['loss_ids']==1:, I find my wrapped sample is like [[{"text":"xxxx"},{"text":"xxxxx"}....],{"guid":0, "label":0}] where the keys in the first part are all "text", but the 48th line in mlm.py seems to require the inputs to include a "loss_ids" key. I suppose the problem is in the "wrap_one_example" function of prompt_base.py file. Is the 207th line ( keys, values= ['text'], [text]) ok or it is a bug ? The model I use is "bert_base".