natolambert commited on
Commit
90eea3b
1 Parent(s): 4b6a00c

fixes plus random

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. src/utils.py +2 -0
app.py CHANGED
@@ -47,7 +47,7 @@ def avg_over_herm(dataframe):
47
  # for each subset, avg the columns that have the subset in the column name, then add a new column with subset name and avg
48
  for subset in subsets:
49
  if subset == "refusals":
50
- subset_cols = ["refusals-dangerous", "refusals-offensive", "donotanswer","xstest-should-refuse", "xstest-shouldnt-refuse"]
51
  else:
52
  subset_cols = [col for col in new_df.columns if subset in col]
53
  new_df[subset] = np.round(np.nanmean(new_df[subset_cols].values, axis=1), 2)
 
47
  # for each subset, avg the columns that have the subset in the column name, then add a new column with subset name and avg
48
  for subset in subsets:
49
  if subset == "refusals":
50
+ subset_cols = ["refusals-dangerous", "refusals-offensive", "donotanswer","xstest-should-refuse", "xstest-should-respond"]
51
  else:
52
  subset_cols = [col for col in new_df.columns if subset in col]
53
  new_df[subset] = np.round(np.nanmean(new_df[subset_cols].values, axis=1), 2)
src/utils.py CHANGED
@@ -6,6 +6,8 @@ import os
6
 
7
  # From Open LLM Leaderboard
8
  def model_hyperlink(link, model_name):
 
 
9
  return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
10
 
11
  # Define a function to fetch and process data
 
6
 
7
  # From Open LLM Leaderboard
8
  def model_hyperlink(link, model_name):
9
+ if model_name == "random":
10
+ return "random"
11
  return f'<a target="_blank" href="{link}" style="color: var(--link-text-color); text-decoration: underline;text-decoration-style: dotted;">{model_name}</a>'
12
 
13
  # Define a function to fetch and process data