Corey Morris commited on
Commit
618dcce
1 Parent(s): dc21a69

Fixed some of the diplicate model issue

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -275,8 +275,12 @@ st.header("Compare selected models to models the closest 5 models on MMLU averag
275
  st.write("This is to demonstrate that while the average score is useful, there is a lot of variation in performance on individual tasks.")
276
  selected_model_name = st.selectbox("Select a Model:", filtered_data.index.tolist())
277
 
278
- # Get the closest 5 models to the selected model based on MMLU average
279
- closest_models = filtered_data['MMLU_average'].sub(filtered_data.loc[selected_model_name, 'MMLU_average']).abs().nsmallest(5).index.tolist()
 
 
 
 
280
 
281
  # Find the top 10 tasks with the largest differences and convert to a DataFrame
282
  top_differences_table, top_differences_tasks = find_top_differences_table(filtered_data, selected_model_name, closest_models)
 
275
  st.write("This is to demonstrate that while the average score is useful, there is a lot of variation in performance on individual tasks.")
276
  selected_model_name = st.selectbox("Select a Model:", filtered_data.index.tolist())
277
 
278
+ # Get the closest 5 models with unique indices
279
+ closest_models_diffs = filtered_data['MMLU_average'].sub(filtered_data.loc[selected_model_name, 'MMLU_average']).abs()
280
+ closest_models = closest_models_diffs.nsmallest(5, keep='first').index.drop_duplicates().tolist()
281
+
282
+
283
+ print(closest_models)
284
 
285
  # Find the top 10 tasks with the largest differences and convert to a DataFrame
286
  top_differences_table, top_differences_tasks = find_top_differences_table(filtered_data, selected_model_name, closest_models)