"test/gpu/ops_test.cpp" did not exist on "792bb51a5d8aff38af54f2496dd6cbcd6c020777"
Commit b19dff50 authored by thefazzer's avatar thefazzer
Browse files

Refactor iteration, indentation fix

parent 432226b0
...@@ -193,13 +193,12 @@ def acc_all(items): ...@@ -193,13 +193,12 @@ def acc_all(items):
question_scoring_dict = {} question_scoring_dict = {}
preds = list(zip(*items))[0] preds = list(zip(*items))[0]
docs = list(zip(*items))[1] docs = list(zip(*items))[1]
for num in range(0, len(preds) - 1):
doc = docs[num]
pred = preds[num]
for (doc, pred) in zip(docs, preds):
question_id = doc["idx"]["question"] question_id = doc["idx"]["question"]
if question_id not in question_scoring_dict: if question_id not in question_scoring_dict:
question_scoring_dict[question_id] = [] question_scoring_dict[question_id] = []
gold_label = doc["label"] == 1 gold_label = doc["label"] == 1
question_scoring_dict[question_id].append(gold_label == pred) question_scoring_dict[question_id].append(gold_label == pred)
......
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