Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jjbuschhoff committed Nov 9, 2023
1 parent ab43abf commit 025898b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lm_eval/tasks/opengptx/flores200.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,7 @@ def construct_requests(self, doc, ctx):
language description, as well as the few shot examples, and the question
part of the document for `doc`.
"""
return [
rf.loglikelihood_rolling(ctx)
]
return [rf.loglikelihood_rolling(ctx)]

def process_results(self, doc, results):
ll = results[0]
Expand Down Expand Up @@ -91,7 +89,7 @@ def higher_is_better(self):
}

def __str__(self):
return f"Flores200 Perplexity Task for {self.language}"
return f"Flores200 Perplexity Task for {self.language}"


def create_ppl_task(lang, version=0):
Expand All @@ -105,9 +103,7 @@ def __init__(self):


def construct_lang_tasks():
return {
f"flores200-lang-{lang}": create_ppl_task(lang) for lang in _LANGUAGES
}
return {f"flores200-lang-{lang}": create_ppl_task(lang) for lang in _LANGUAGES}


class FloresTranslationTask(Task):
Expand Down Expand Up @@ -224,7 +220,8 @@ def construct_trans_tasks():
for src, tgt in permutations(_LANGUAGES, 2)
}

_LANGUAGES=[

_LANGUAGES = [
# "ace_Arab",
# "ace_Latn",
# "acm_Arab",
Expand Down Expand Up @@ -429,4 +426,4 @@ def construct_trans_tasks():
# "zho_Hant",
# "zsm_Latn",
# "zul_Latn",
]
]

0 comments on commit 025898b

Please sign in to comment.