Unverified Commit 5a5acc08 authored by Baber Abbasi's avatar Baber Abbasi Committed by GitHub
Browse files

fix `construct_requests` kwargs (#2700)

parent 157d8c3c
...@@ -33,7 +33,9 @@ class FDA(ConfigurableTask): ...@@ -33,7 +33,9 @@ class FDA(ConfigurableTask):
def doc_to_target(self, doc): def doc_to_target(self, doc):
return doc["value"] return doc["value"]
def construct_requests(self, doc, ctx, **kwargs): def construct_requests(
self, doc, ctx, chat_template=None, apply_chat_template=False, **kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of """Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM. Requests which will be sent to the LM.
......
...@@ -33,7 +33,9 @@ class SQUADCompletion(ConfigurableTask): ...@@ -33,7 +33,9 @@ class SQUADCompletion(ConfigurableTask):
def doc_to_target(self, doc): def doc_to_target(self, doc):
return doc["value"] return doc["value"]
def construct_requests(self, doc, ctx, **kwargs): def construct_requests(
self, doc, ctx, chat_template=None, apply_chat_template=False, **kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of """Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM. Requests which will be sent to the LM.
......
...@@ -105,7 +105,9 @@ class SQuAD2(ConfigurableTask): ...@@ -105,7 +105,9 @@ class SQuAD2(ConfigurableTask):
answer = "unanswerable" answer = "unanswerable"
return " " + answer return " " + answer
def construct_requests(self, doc, ctx, **kwargs): def construct_requests(
self, doc, ctx, chat_template=None, apply_chat_template=False, **kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of """Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM. Requests which will be sent to the LM.
......
...@@ -33,7 +33,9 @@ class SWDE(ConfigurableTask): ...@@ -33,7 +33,9 @@ class SWDE(ConfigurableTask):
def doc_to_target(self, doc): def doc_to_target(self, doc):
return doc["value"] return doc["value"]
def construct_requests(self, doc, ctx, **kwargs): def construct_requests(
self, doc, ctx, chat_template=None, apply_chat_template=False, **kwargs
):
"""Uses RequestFactory to construct Requests and returns an iterable of """Uses RequestFactory to construct Requests and returns an iterable of
Requests which will be sent to the LM. Requests which will be sent to the LM.
......
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