"vscode:/vscode.git/clone" did not exist on "2bcf98d70610bdff1d6f39f752949f6a0f8c5b89"
Unverified Commit 003c2581 authored by Lintang Sutawika's avatar Lintang Sutawika Committed by GitHub
Browse files

multple_choice handles 2 cases

parent 87d93e99
...@@ -772,19 +772,25 @@ class ConfigurableTask(Task): ...@@ -772,19 +772,25 @@ class ConfigurableTask(Task):
# TODO: any cleaner way to do this? # TODO: any cleaner way to do this?
if self.multiple_input: if self.multiple_input:
choices = self.doc_to_text(doc) choices = self.doc_to_text(doc)
continuation = self.doc_to_target(doc) cont = self.doc_to_target(doc)
arguments = [
(ctx, " {}".format(cont)) for ctx in choices
]
else: else:
continuation = self.create_choices(doc) cont = self.create_choices(doc)
arguments = [
(ctx, " {}".format(cont)) for cont in choices
]
request_list = [ request_list = [
Instance( Instance(
request_type="loglikelihood", request_type="loglikelihood",
doc=doc, doc=doc,
arguments=(ctx, " {}".format(choice)), arguments=arguments,
idx=i, idx=i,
**kwargs, **kwargs,
) )
for i, choice in enumerate(choices) for i, arg in enumerate(arguments)
] ]
# TODO: we should raise a warning telling users this will at most ~2x runtime. # TODO: we should raise a warning telling users this will at most ~2x runtime.
if "acc_mutual_info" in self._metric_fn_list.keys(): if "acc_mutual_info" in self._metric_fn_list.keys():
......
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