Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arena leaderboard: add checkbox to hide proprietary models #3658

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions fastchat/serve/monitor/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,12 @@ def arena_hard_process(leaderboard_table_file, filepath):


def get_arena_table(
arena_df, model_table_df, arena_subset_df=None, hidden_models=None, is_overall=False
arena_df,
model_table_df,
arena_subset_df=None,
hidden_models=None,
is_overall=False,
hide_proprietary=False,
):
arena_df = arena_df.sort_values(
by=["final_ranking", "rating"], ascending=[True, False]
Expand Down Expand Up @@ -315,6 +320,9 @@ def process_row(row):
print(f"Warning: {model_key} not found in model table")
return None

if hide_proprietary and model_info.get("License", "").startswith("Propr"):
return None

ranking = row.get("final_ranking") or row.name + 1
result = [ranking if isinstance(ranking, str) else int(ranking)]

Expand Down Expand Up @@ -483,6 +491,7 @@ def update_leaderboard_and_plots(category, filters):
else deprecated_model_name
),
is_overall=category == "Overall",
hide_proprietary="Hide Proprietary" in filters,
)
if category != "Overall":
arena_values = update_leaderboard_df(arena_values)
Expand Down Expand Up @@ -590,7 +599,7 @@ def update_leaderboard_and_plots(category, filters):
)
with gr.Column(scale=2):
category_checkbox = gr.CheckboxGroup(
["Style Control", "Show Deprecated"],
["Style Control", "Show Deprecated", "Hide Proprietary"],
label="Apply filter",
info="",
)
Expand Down
Loading