Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clean up
Browse files
app.py
CHANGED
@@ -258,14 +258,13 @@ def toggle_all_categories(action: str) -> list[gr.CheckboxGroup]:
|
|
258 |
TASK_AVG_NAME_MAP = {
|
259 |
c.name: c.task_type.name for c in fields(AutoEvalColumn) if c.average and c.task_type != TaskType.AVG
|
260 |
}
|
|
|
261 |
|
262 |
|
263 |
def plot_size_vs_score(df_filtered: pd.DataFrame) -> go.Figure:
|
264 |
df = ORIGINAL_DF[ORIGINAL_DF[AutoEvalColumn.row_id.name].isin(df_filtered[AutoEvalColumn.row_id.name])]
|
265 |
df = df[df["#Params (B)"] > 0]
|
266 |
-
AVG_COLUMNS = ["AVG"] + list(TASK_AVG_NAME_MAP.keys())
|
267 |
df = df[["model_name_for_query", "#Params (B)", "Few-shot"] + AVG_COLUMNS]
|
268 |
-
df[AVG_COLUMNS] = df[AVG_COLUMNS].astype(float)
|
269 |
df = df.rename(columns={"model_name_for_query": "Model", "Few-shot": "n-shot"})
|
270 |
df["model_name_without_org_name"] = df["Model"].str.split("/").str[-1] + " (" + df["n-shot"].astype(str) + "-shot)"
|
271 |
df = pd.melt(
|
@@ -316,8 +315,7 @@ def plot_average_scores(df_filtered: pd.DataFrame) -> go.Figure:
|
|
316 |
df = df[["model_name_for_query", "Few-shot"] + list(TASK_AVG_NAME_MAP.keys())]
|
317 |
df = df.rename(columns={"model_name_for_query": "Model", "Few-shot": "n-shot"})
|
318 |
df = df.rename(columns=TASK_AVG_NAME_MAP)
|
319 |
-
df
|
320 |
-
df = df.set_index(["Model", "n-shot"]).astype(float)
|
321 |
|
322 |
fig = go.Figure()
|
323 |
for i, ((name, n_shot), row) in enumerate(df.iterrows()):
|
|
|
258 |
TASK_AVG_NAME_MAP = {
|
259 |
c.name: c.task_type.name for c in fields(AutoEvalColumn) if c.average and c.task_type != TaskType.AVG
|
260 |
}
|
261 |
+
AVG_COLUMNS = ["AVG"] + list(TASK_AVG_NAME_MAP.keys())
|
262 |
|
263 |
|
264 |
def plot_size_vs_score(df_filtered: pd.DataFrame) -> go.Figure:
|
265 |
df = ORIGINAL_DF[ORIGINAL_DF[AutoEvalColumn.row_id.name].isin(df_filtered[AutoEvalColumn.row_id.name])]
|
266 |
df = df[df["#Params (B)"] > 0]
|
|
|
267 |
df = df[["model_name_for_query", "#Params (B)", "Few-shot"] + AVG_COLUMNS]
|
|
|
268 |
df = df.rename(columns={"model_name_for_query": "Model", "Few-shot": "n-shot"})
|
269 |
df["model_name_without_org_name"] = df["Model"].str.split("/").str[-1] + " (" + df["n-shot"].astype(str) + "-shot)"
|
270 |
df = pd.melt(
|
|
|
315 |
df = df[["model_name_for_query", "Few-shot"] + list(TASK_AVG_NAME_MAP.keys())]
|
316 |
df = df.rename(columns={"model_name_for_query": "Model", "Few-shot": "n-shot"})
|
317 |
df = df.rename(columns=TASK_AVG_NAME_MAP)
|
318 |
+
df = df.set_index(["Model", "n-shot"])
|
|
|
319 |
|
320 |
fig = go.Figure()
|
321 |
for i, ((name, n_shot), row) in enumerate(df.iterrows()):
|