hysts HF staff commited on
Commit
c3e14be
1 Parent(s): c666df6

Fix the x-axis of the size vs. avg graph

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -257,6 +257,8 @@ INITIAL_COLUMNS = ["T"] + [
257
  ]
258
  leaderboard_df = select_columns(leaderboard_df, INITIAL_COLUMNS)
259
 
 
 
260
 
261
  # Leaderboard demo
262
 
@@ -318,7 +320,7 @@ def plot_size_vs_score(df_filtered: pd.DataFrame, df_original: pd.DataFrame) ->
318
  hovertemplate="<b>%{customdata[0]}</b><br>#Params: %{x:.2f}B<br>n-shot: %{customdata[1]}<br>AVG: %{y:.4f}<extra></extra>",
319
  textposition="top right",
320
  )
321
- fig.update_layout(yaxis_range=[0, 1])
322
  return fig
323
 
324
 
 
257
  ]
258
  leaderboard_df = select_columns(leaderboard_df, INITIAL_COLUMNS)
259
 
260
+ MAX_MODEL_SIZE = original_df["#Params (B)"].max()
261
+
262
 
263
  # Leaderboard demo
264
 
 
320
  hovertemplate="<b>%{customdata[0]}</b><br>#Params: %{x:.2f}B<br>n-shot: %{customdata[1]}<br>AVG: %{y:.4f}<extra></extra>",
321
  textposition="top right",
322
  )
323
+ fig.update_layout(xaxis_range=[0, MAX_MODEL_SIZE * 1.2], yaxis_range=[0, 1])
324
  return fig
325
 
326