Commit ba9c13b2 authored by Leo Gao's avatar Leo Gao
Browse files

Fix translation context

parent 03f34463
......@@ -21,7 +21,8 @@ class DummyLM(LM):
def greedy_until(self, requests):
res = []
for _ in requests:
for ctx, _ in requests:
res.append("lol")
assert ctx.strip() != ''
return res
......@@ -145,12 +145,6 @@ class GeneralTranslationTask(Task):
tar_lang = code_to_language(language_codes[1])
return f"Translate these {src_lang} phrases to {tar_lang}."
# TODO This should be something like
# French: {src_line}
# English: {ref_line}
def fewshot_context(self, doc, num_fewshot, provide_description):
return ""
def __str__(self):
language_codes = self.sacrebleu_language_pair.split("-")
src_lang = code_to_language(language_codes[0])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment