From 72f86773a6ad0e2674e4901fe2438f9164c8908c Mon Sep 17 00:00:00 2001 From: huyiwen <1020030101@qq.com> Date: Mon, 27 May 2024 22:22:16 +0800 Subject: [PATCH] [Minor] fix styles --- utilization/dataset/xnli.py | 2 +- utilization/dataset/xwinograd.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/utilization/dataset/xnli.py b/utilization/dataset/xnli.py index 1dbcc16b..ac56132e 100644 --- a/utilization/dataset/xnli.py +++ b/utilization/dataset/xnli.py @@ -22,7 +22,7 @@ class Xnli(MultipleChoiceDataset): example_set = "train" load_args = ("xnli",) banned_subsets = ["all_languages"] - + def init_arguments(self): from langcodes import Language self.language = Language(self.subset_name).language_name("en") diff --git a/utilization/dataset/xwinograd.py b/utilization/dataset/xwinograd.py index e5c51b92..e372f7ed 100644 --- a/utilization/dataset/xwinograd.py +++ b/utilization/dataset/xwinograd.py @@ -4,6 +4,7 @@ logger = getLogger(__name__) + class Xwinograd(MultipleChoiceDataset): """The dataset of XWinograd. @@ -25,7 +26,7 @@ class Xwinograd(MultipleChoiceDataset): instruction = "Given the sentence '{{sentence.strip()}}' in {{lang}}, fill in the blank with the appropriate option: who does '_' refer to?{{'\n'+options if options}}\nAnswer:" evaluation_set = "test" load_args = ("Muennighoff/xwinograd",) - + def init_arguments(self): from langcodes import Language self.language = Language(self.subset_name).language_name("en")