Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
·
7f4ea04
1
Parent(s):
b28021f
added deduplication system, commented for now
Browse files
app.py
CHANGED
|
@@ -199,6 +199,12 @@ def add_new_eval(
|
|
| 199 |
if num_questions[1] + num_questions[2] + num_questions[3] != ref_scores_len[val_or_test]:
|
| 200 |
return format_error(f"Your submission has {len(scores['all'])} questions for the {val_or_test} set, but it should have {ref_scores_len[val_or_test]}. Please check your submission.")
|
| 201 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
eval_results[val_or_test] = eval_results[val_or_test].add_item(eval_entry)
|
| 203 |
print(eval_results)
|
| 204 |
if LOCAL_DEBUG:
|
|
|
|
| 199 |
if num_questions[1] + num_questions[2] + num_questions[3] != ref_scores_len[val_or_test]:
|
| 200 |
return format_error(f"Your submission has {len(scores['all'])} questions for the {val_or_test} set, but it should have {ref_scores_len[val_or_test]}. Please check your submission.")
|
| 201 |
|
| 202 |
+
# Testing for duplicates - to see if we want to add something like it as it would allow people to try to see the content of other submissions
|
| 203 |
+
#eval_entry_no_date = {k: v for k, v in eval_entry if k != "date"}
|
| 204 |
+
#columns_no_date = [c for c in eval_results[val_or_test].column_names if c != "date"]
|
| 205 |
+
#if eval_entry_no_date in eval_results[val_or_test].select_columns(columns_no_date):
|
| 206 |
+
# return format_error(f"Your submission is an exact duplicate from an existing submission.")
|
| 207 |
+
|
| 208 |
eval_results[val_or_test] = eval_results[val_or_test].add_item(eval_entry)
|
| 209 |
print(eval_results)
|
| 210 |
if LOCAL_DEBUG:
|