Commit 09a71562 authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

log all arguments per doc

parent 165f8493
...@@ -213,7 +213,10 @@ def evaluate( ...@@ -213,7 +213,10 @@ def evaluate(
# aggregate Instances by LM method requested to get output. # aggregate Instances by LM method requested to get output.
reqtype = ( reqtype = (
"loglikelihood" "loglikelihood"
if (task.OUTPUT_TYPE == "multiple_choice" or task.OUTPUT_TYPE == "winograd_schema") if (
task.OUTPUT_TYPE == "multiple_choice"
or task.OUTPUT_TYPE == "winograd_schema"
)
else task.OUTPUT_TYPE else task.OUTPUT_TYPE
) # TODO: this is hacky, fix in task.py ) # TODO: this is hacky, fix in task.py
requests[reqtype].extend(task.instances) requests[reqtype].extend(task.instances)
...@@ -284,7 +287,7 @@ def evaluate( ...@@ -284,7 +287,7 @@ def evaluate(
"doc_id": doc_id, "doc_id": doc_id,
"doc": doc, "doc": doc,
"target": target, "target": target,
"arguments": requests[0].args, "arguments": [req.args for req in requests],
"resps": [req.resps for req in requests], "resps": [req.resps for req in requests],
"filtered_resps": [req.filtered_resps[key] for req in requests], "filtered_resps": [req.filtered_resps[key] for req in requests],
} }
......
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