diff --git a/openprompt/prompts/manual_verbalizer.py b/openprompt/prompts/manual_verbalizer.py index 651d8d3b..31725c9a 100644 --- a/openprompt/prompts/manual_verbalizer.py +++ b/openprompt/prompts/manual_verbalizer.py @@ -19,7 +19,7 @@ class ManualVerbalizer(Verbalizer): Args: tokenizer (:obj:`PreTrainedTokenizer`): The tokenizer of the current pre-trained model to point out the vocabulary. classes (:obj:`List[Any]`): The classes (or labels) of the current task. - label_words (:obj:`Union[Sequence[str], Mapping[str, str]]`, optional): The label words that are projected by the labels. + label_words (:obj:`Union[List[str], List[List[str]], Dict[List[str]]]`, optional): The label words that are projected by the labels. prefix (:obj:`str`, optional): The prefix string of the verbalizer (used in PLMs like RoBERTa, which is sensitive to prefix space) multi_token_handler (:obj:`str`, optional): The handling strategy for multiple tokens produced by the tokenizer. post_log_softmax (:obj:`bool`, optional): Whether to apply log softmax post processing on label_logits. Default to True. diff --git a/openprompt/prompts/soft_verbalizer.py b/openprompt/prompts/soft_verbalizer.py index 16e55a9a..8657d3b6 100644 --- a/openprompt/prompts/soft_verbalizer.py +++ b/openprompt/prompts/soft_verbalizer.py @@ -25,7 +25,7 @@ class SoftVerbalizer(Verbalizer): Args: tokenizer (:obj:`PreTrainedTokenizer`): The tokenizer of the current pre-trained model to point out the vocabulary. classes (:obj:`List[Any]`): The classes (or labels) of the current task. - label_words (:obj:`Union[Sequence[str], Mapping[str, str]]`, optional): The label words that are projected by the labels. + label_words (:obj:`Union[List[str], List[List[str]], Dict[List[str]]]`, optional): The label words that are projected by the labels. prefix (:obj:`str`, optional): The prefix string of the verbalizer (used in PLMs like RoBERTa, which is sensitive to prefix space) multi_token_handler (:obj:`str`, optional): The handling strategy for multiple tokens produced by the tokenizer. post_log_softmax (:obj:`bool`, optional): Whether to apply log softmax post processing on label_logits. Default to True.