thunlp / OpenPrompt

An Open-Source Framework for Prompt-Learning.
https://thunlp.github.io/OpenPrompt/
Apache License 2.0
4.38k stars 455 forks source link

forward_without_verbalize #178

Open vickywu1022 opened 2 years ago

vickywu1022 commented 2 years ago

When doing prompt-learning without any verbalizer, I used forward_without_verbalize and encountered an error:

Traceback (most recent call last):
File "~/OpenPrompt/openprompt/pipeline_base.py", line 309, in forward_without_verbalize
    outputs = self.verbalizer.gather_outputs(outputs)
AttributeError: 'NoneType' object has no attribute 'gather_outputs'

I think there is no need for such gathering since we use no verbalizer here:)