chk_answer = []
for data in answer:
chk_answer.append({
'task': data['task'],
'output': data['output'],
'instruction': data['instruction'],
'ID': data['ID']
})
diff = False
for data in submission:
if {
'task': data['task'],
'output': data['output'],
'instruction': data['instruction'],
'ID': data['ID']
} not in chk_answer:
diff = True
break
assert diff == False, 'Submission file is not valid'
print('File is valid! Loading File...')
The 'output' value of submission and gt answer is probably different. So there will definitely be an AssertionError.
The
'output'
value of submission and gt answer is probably different. So there will definitely be anAssertionError
.