Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 9a910ff

Browse files
committed
Make writing qa preds work on data without is_impossible tags
1 parent 9b6a29d commit 9a910ff

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

farm/data_handler/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def write_squad_predictions(predictions, out_filename, predictions_filename=None
299299
for d in temp["data"]:
300300
for p in d["paragraphs"]:
301301
for q in p["qas"]:
302-
if q["is_impossible"]:
302+
if q.get("is_impossible",False):
303303
dev_labels[q["id"]] = "is_impossible"
304304
else:
305305
dev_labels[q["id"]] = q["answers"][0]["text"]

0 commit comments

Comments
 (0)