shchuro commited on
Commit
b8a707c
·
1 Parent(s): 585789a

Hide extra columns

Browse files
Files changed (2) hide show
  1. fev_pages/fev_bench.py +16 -0
  2. src/utils.py +2 -2
fev_pages/fev_bench.py CHANGED
@@ -58,6 +58,10 @@ MODEL_TYPES_HELP = (
58
  'Click "See details" below the leaderboard for a description of each model type.'
59
  )
60
  NON_COMMERCIAL_HELP = "Include models whose license does not permit commercial use."
 
 
 
 
61
 
62
  # Group type options
63
  GROUP_TYPES = [
@@ -202,6 +206,12 @@ with st.sidebar:
202
  )
203
  st.caption(f"{num_models} models")
204
 
 
 
 
 
 
 
205
  cols = st.columns(spec=[0.025, 0.95, 0.025])
206
 
207
  with cols[1] as main_container:
@@ -231,6 +241,12 @@ with cols[1] as main_container:
231
  df_styled,
232
  width="stretch",
233
  hide_index=True,
 
 
 
 
 
 
234
  column_config={
235
  "model_name": st.column_config.LinkColumn(
236
  label="Model", display_text=r"#(.*)$"
 
58
  'Click "See details" below the leaderboard for a description of each model type.'
59
  )
60
  NON_COMMERCIAL_HELP = "Include models whose license does not permit commercial use."
61
+ IMPUTATION_COLUMNS_HELP = (
62
+ "Percentage of tasks where the model's training corpus overlaps with the task (scores replaced "
63
+ f"with {LEAKAGE_IMPUTATION_MODEL}) or the model failed (scores replaced with {BASELINE_MODEL})."
64
+ )
65
 
66
  # Group type options
67
  GROUP_TYPES = [
 
206
  )
207
  st.caption(f"{num_models} models")
208
 
209
+ st.divider()
210
+
211
+ show_imputation_columns = st.toggle(
212
+ "Show leakage & failure columns", value=False, help=IMPUTATION_COLUMNS_HELP
213
+ )
214
+
215
  cols = st.columns(spec=[0.025, 0.95, 0.025])
216
 
217
  with cols[1] as main_container:
 
241
  df_styled,
242
  width="stretch",
243
  hide_index=True,
244
+ column_order=[
245
+ col
246
+ for col in df_styled.data.columns
247
+ if show_imputation_columns
248
+ or col not in ("training_corpus_overlap", "num_failures")
249
+ ],
250
  column_config={
251
  "model_name": st.column_config.LinkColumn(
252
  label="Model", display_text=r"#(.*)$"
src/utils.py CHANGED
@@ -170,10 +170,10 @@ def format_leaderboard(df: pd.DataFrame):
170
  "win_rate",
171
  "skill_score",
172
  "median_inference_time_s_per100",
173
- "training_corpus_overlap",
174
- "num_failures",
175
  "org",
176
  "tags",
 
 
177
  ]
178
  ]
179
  return df.style.apply(
 
170
  "win_rate",
171
  "skill_score",
172
  "median_inference_time_s_per100",
 
 
173
  "org",
174
  "tags",
175
+ "training_corpus_overlap",
176
+ "num_failures",
177
  ]
178
  ]
179
  return df.style.apply(