Jofthomas commited on
Commit
6b849a6
·
verified ·
1 Parent(s): 0d31417

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -357,7 +357,7 @@ async def submit_answers(submission: Submission = Body(...)):
357
  message = f"Submission received, but no valid/matching task IDs were found in the {total_attempted_in_payload} answers provided."
358
  logger.warning(f"No valid answers processed for {submission.username} out of {total_attempted_in_payload} submitted.")
359
  else:
360
- score = round((correct_count / valid_attempted_count) * 100, 2)
361
  message = f"Score calculated successfully: {correct_count}/{valid_attempted_count} correct answers for valid tasks."
362
  if valid_attempted_count < total_attempted_in_payload:
363
  message += f" ({total_attempted_in_payload - valid_attempted_count} submitted answers had invalid or duplicate task IDs)."
 
357
  message = f"Submission received, but no valid/matching task IDs were found in the {total_attempted_in_payload} answers provided."
358
  logger.warning(f"No valid answers processed for {submission.username} out of {total_attempted_in_payload} submitted.")
359
  else:
360
+ score = round((correct_count / len(ground_truth_answers)) * 100, 2)
361
  message = f"Score calculated successfully: {correct_count}/{valid_attempted_count} correct answers for valid tasks."
362
  if valid_attempted_count < total_attempted_in_payload:
363
  message += f" ({total_attempted_in_payload - valid_attempted_count} submitted answers had invalid or duplicate task IDs)."