Unverified Commit 13ed1343 authored by Stella Biderman's avatar Stella Biderman Committed by GitHub
Browse files

Merge pull request #333 from OpenGPTX/squad_fix_keyerror

Fix key access in squad evaluation metrics
parents 4645584f 1a153185
......@@ -40,7 +40,7 @@ def _squad_metric(predictions, references):
def _squad_agg(key, items):
predictions, references = zip(*items)
return _squad_metric(predictions=predictions, references=references)[key]
return _squad_metric(predictions=predictions, references=references).get(key, 0)
class SQuAD2(Task):
......
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