Skip to content

Commit e5dc446

Browse files
infwinstonsimon-moBabyChouSr
authored
Update monitor (#3426)
Co-authored-by: simon-mo <simon.mo@hey.com> Co-authored-by: Christopher Chou <49086305+BabyChouSr@users.noreply.github.com>
1 parent be5db52 commit e5dc446

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

fastchat/serve/monitor/monitor.py

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ def build_arena_tab(
490490
)
491491
return
492492

493-
round_digit = None if vision else None
494493
arena_dfs = {}
495494
category_elo_results = {}
496495
last_updated_time = elo_results["full"]["last_updated_datetime"].split(" ")[0]
@@ -513,7 +512,6 @@ def update_leaderboard_and_plots(category):
513512
arena_df,
514513
model_table_df,
515514
arena_subset_df=arena_subset_df if category != "Overall" else None,
516-
round_digit=round_digit,
517515
)
518516
if category != "Overall":
519517
arena_values = update_leaderboard_df(arena_values)
@@ -667,7 +665,9 @@ def update_leaderboard_and_plots(category):
667665
elem_id="leaderboard_markdown",
668666
)
669667

670-
leader_component_values[:] = [default_md, p1, p2, p3, p4]
668+
if not vision:
669+
# only live update the text tab
670+
leader_component_values[:] = [default_md, p1, p2, p3, p4]
671671

672672
if show_plot:
673673
more_stats_md = gr.Markdown(
@@ -740,7 +740,7 @@ def build_full_leaderboard_tab(elo_results, model_table_df):
740740

741741

742742
def build_leaderboard_tab(
743-
elo_results_file, leaderboard_table_file, vision=True, show_plot=False, mirror=False
743+
elo_results_file, leaderboard_table_file, show_plot=False, mirror=False
744744
):
745745
if elo_results_file is None: # Do live update
746746
default_md = "Loading ..."
@@ -776,15 +776,14 @@ def build_leaderboard_tab(
776776
default_md,
777777
show_plot=show_plot,
778778
)
779-
if vision:
780-
with gr.Tab("📣 NEW: Arena (Vision)", id=1):
781-
build_arena_tab(
782-
elo_results_vision,
783-
model_table_df,
784-
default_md,
785-
vision=True,
786-
show_plot=show_plot,
787-
)
779+
with gr.Tab("📣 NEW: Arena (Vision)", id=1):
780+
build_arena_tab(
781+
elo_results_vision,
782+
model_table_df,
783+
default_md,
784+
vision=True,
785+
show_plot=show_plot,
786+
)
788787
with gr.Tab("Full Leaderboard", id=2):
789788
build_full_leaderboard_tab(elo_results_text, model_table_df)
790789

0 commit comments

Comments
 (0)