diff --git a/fastchat/serve/monitor/monitor.py b/fastchat/serve/monitor/monitor.py index 5cbed3f6d..eda1888df 100644 --- a/fastchat/serve/monitor/monitor.py +++ b/fastchat/serve/monitor/monitor.py @@ -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] @@ -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)] @@ -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) @@ -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="", )