Skip to content

Commit

Permalink
support py3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
sileod committed Aug 25, 2023
1 parent 27b8d13 commit a05a6d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tasknet/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from frozendict import frozendict as fdict
import funcy as fc
import evaluate
from dataclasses import dataclass
from dataclasses import dataclass, field
import re
from transformers.tokenization_utils_base import PreTrainedTokenizerBase
import inspect
Expand Down Expand Up @@ -199,7 +199,7 @@ def __call__(self, features):
class MultipleChoice(Classification):
task_type = "MultipleChoice"
num_labels:int = 2
data_collator:...= DataCollatorForMultipleChoice()
data_collator:...= field(default_factory=DataCollatorForMultipleChoice)
choices: ... = tuple()
s1: str = "inputs"

Expand Down Expand Up @@ -345,7 +345,7 @@ def check(self):
@dataclass
class Seq2SeqLM(Task):
task_type='Seq2SeqLM'
data_collator:...=DataCollatorForSeq2Seq(None)
data_collator:... = field(default_factory=lambda: DataCollatorForSeq2Seq(None))
s1:str=''
s2:str=''
metric:...=evaluate.load("bleu")
Expand Down

0 comments on commit a05a6d2

Please sign in to comment.