Skip to content

Commit

Permalink
Default tasks to not using multimask
Browse files Browse the repository at this point in the history
  • Loading branch information
nelson-liu authored Mar 10, 2021
1 parent 271910e commit c2fa4f8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pet/pvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def __init__(self, wrapper, pattern_id: int = 0, verbalizer_file: str = None, se
if verbalizer_file:
self.verbalize = PVP._load_verbalizer_from_file(verbalizer_file, self.pattern_id)

use_multimask = issubclass(TASK_HELPERS[self.wrapper.config.task_name], MultiMaskTaskHelper)
use_multimask = (self.wrapper.config.task_name in TASK_HELPERS) and (
issubclass(TASK_HELPERS[self.wrapper.config.task_name], MultiMaskTaskHelper)
)
if not use_multimask and self.wrapper.config.wrapper_type in [wrp.MLM_WRAPPER, wrp.PLM_WRAPPER]:
self.mlm_logits_to_cls_logits_tensor = self._build_mlm_logits_to_cls_logits_tensor()

Expand Down

0 comments on commit c2fa4f8

Please sign in to comment.