lewtun HF staff commited on
Commit
326ac2a
1 Parent(s): dd6f307

Fix model load

Browse files
Files changed (2) hide show
  1. app.py +9 -8
  2. evaluation.py +7 -4
app.py CHANGED
@@ -260,14 +260,15 @@ with st.form(key="form"):
260
  selected_models = st.multiselect("Select the models you wish to evaluate", compatible_models)
261
  print("Selected models:", selected_models)
262
 
263
- selected_models = filter_evaluated_models(
264
- selected_models,
265
- selected_task,
266
- selected_dataset,
267
- selected_config,
268
- selected_split,
269
- )
270
- print("Selected models:", selected_models)
 
271
 
272
  submit_button = st.form_submit_button("Make submission")
273
 
 
260
  selected_models = st.multiselect("Select the models you wish to evaluate", compatible_models)
261
  print("Selected models:", selected_models)
262
 
263
+ if len(selected_models) > 0:
264
+ selected_models = filter_evaluated_models(
265
+ selected_models,
266
+ selected_task,
267
+ selected_dataset,
268
+ selected_config,
269
+ selected_split,
270
+ )
271
+ print("Selected models:", selected_models)
272
 
273
  submit_button = st.form_submit_button("Make submission")
274
 
evaluation.py CHANGED
@@ -15,10 +15,13 @@ class EvaluationInfo:
15
 
16
 
17
  def compute_evaluation_id(dataset_info: DatasetInfo) -> int:
18
- metadata = dataset_info.cardData["eval_info"]
19
- metadata.pop("col_mapping", None)
20
- evaluation_info = EvaluationInfo(**metadata)
21
- return hash(evaluation_info)
 
 
 
22
 
23
 
24
  def get_evaluation_ids():
 
15
 
16
 
17
  def compute_evaluation_id(dataset_info: DatasetInfo) -> int:
18
+ if dataset_info.cardData is not None:
19
+ metadata = dataset_info.cardData["eval_info"]
20
+ metadata.pop("col_mapping", None)
21
+ evaluation_info = EvaluationInfo(**metadata)
22
+ return hash(evaluation_info)
23
+ else:
24
+ return None
25
 
26
 
27
  def get_evaluation_ids():