"magic_pdf/git@developer.sourcefind.cn:wangsen/mineru.git" did not exist on "9fee2ce09f1404a212a00c2de29ef6b075988c1a"
Commit e162dc46 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

run linters

parent 197594f1
...@@ -34,7 +34,7 @@ class FDA(ConfigurableTask): ...@@ -34,7 +34,7 @@ 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, **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.
...@@ -93,7 +93,7 @@ class FDA(ConfigurableTask): ...@@ -93,7 +93,7 @@ class FDA(ConfigurableTask):
return { return {
"contains": True, # Exact match (the normalized answer exactly match the gold answer "contains": True, # Exact match (the normalized answer exactly match the gold answer
} }
def contains_score(prediction: str, labels: List[str]): def contains_score(prediction: str, labels: List[str]):
return max( return max(
......
...@@ -34,7 +34,7 @@ class SQUADCompletion(ConfigurableTask): ...@@ -34,7 +34,7 @@ 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, **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.
...@@ -93,7 +93,7 @@ class SQUADCompletion(ConfigurableTask): ...@@ -93,7 +93,7 @@ class SQUADCompletion(ConfigurableTask):
return { return {
"contains": True, # Exact match (the normalized answer exactly match the gold answer "contains": True, # Exact match (the normalized answer exactly match the gold answer
} }
def contains_score(prediction: str, labels: List[str]): def contains_score(prediction: str, labels: List[str]):
return max( return max(
......
...@@ -38,7 +38,7 @@ class SWDE(ConfigurableTask): ...@@ -38,7 +38,7 @@ 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, **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.
...@@ -97,7 +97,7 @@ class SWDE(ConfigurableTask): ...@@ -97,7 +97,7 @@ class SWDE(ConfigurableTask):
return { return {
"contains": True, # Exact match (the normalized answer exactly match the gold answer "contains": True, # Exact match (the normalized answer exactly match the gold answer
} }
def contains_score(prediction: str, labels: List[str]): def contains_score(prediction: str, labels: List[str]):
return max( return max(
......
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