Aaron Mueller commited on
Commit
1ab72b5
·
1 Parent(s): e7e9a2c
app.py CHANGED
@@ -191,7 +191,7 @@ with demo:
191
  model_name_textbox,
192
  revision_name_textbox,
193
  track_name,
194
- upload_button,
195
  ],
196
  submission_result,
197
  )
 
191
  model_name_textbox,
192
  revision_name_textbox,
193
  track_name,
194
+ submitted_predictions,
195
  ],
196
  submission_result,
197
  )
src/leaderboard/read_evals.py CHANGED
@@ -54,6 +54,7 @@ class EvalResult:
54
 
55
  def _get_task_results(task):
56
  # We average all scores of a given metric (not all metrics are present in all files)
 
57
  accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark == k])
58
  if accs.size == 0 or any([acc is None for acc in accs]):
59
  return None
 
54
 
55
  def _get_task_results(task):
56
  # We average all scores of a given metric (not all metrics are present in all files)
57
+ print(data["results"].items())
58
  accs = np.array([v.get(task.metric, None) for k, v in data["results"].items() if task.benchmark == k])
59
  if accs.size == 0 or any([acc is None for acc in accs]):
60
  return None
src/submission/submit.py CHANGED
@@ -16,9 +16,9 @@ USERS_TO_SUBMISSION_DATES = None
16
 
17
  def add_new_eval(
18
  model_name: str,
19
- preds_path: str,
20
- track: str,
21
  revision: str,
 
 
22
  ):
23
  global REQUESTED_MODELS
24
  global USERS_TO_SUBMISSION_DATES
@@ -32,9 +32,6 @@ def add_new_eval(
32
  model_path = model_name.split("/")[1]
33
 
34
  current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
35
-
36
- if preds_path is None or preds_path == "":
37
- return styled_error("Please enter a URL where your predictions file can be downloaded.")
38
 
39
  if track is None:
40
  return styled_error("Please select a track.")
@@ -58,9 +55,9 @@ def add_new_eval(
58
 
59
  eval_entry = {
60
  "model_name": model_name,
61
- "preds_path": preds_path,
62
- "track": track,
63
  "revision": revision,
 
 
64
  "status": "PENDING",
65
  "submitted_time": current_time,
66
  "private": False,
@@ -91,5 +88,5 @@ def add_new_eval(
91
  os.remove(out_path)
92
 
93
  return styled_message(
94
- "Your request has been submitted to the evaluation queue!\nPlease wait for up to an hour for the model to show in the PENDING list."
95
- )
 
16
 
17
  def add_new_eval(
18
  model_name: str,
 
 
19
  revision: str,
20
+ track: str,
21
+ predictions: dict,
22
  ):
23
  global REQUESTED_MODELS
24
  global USERS_TO_SUBMISSION_DATES
 
32
  model_path = model_name.split("/")[1]
33
 
34
  current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
 
 
 
35
 
36
  if track is None:
37
  return styled_error("Please select a track.")
 
55
 
56
  eval_entry = {
57
  "model_name": model_name,
 
 
58
  "revision": revision,
59
+ "track": track,
60
+ "predictions": predictions,
61
  "status": "PENDING",
62
  "submitted_time": current_time,
63
  "private": False,
 
88
  os.remove(out_path)
89
 
90
  return styled_message(
91
+ "Your request has been submitted to the evaluation queue!\nPlease wait for up to an hour for the request to show in the PENDING list."
92
+ )