Spaces:
Running
Running
Fix timer arg mismatch that wipes alternative agents table; remove OpenHands Sub-agents
#36
by simonrosenberg1 - opened
- simple_data_loader.py +2 -1
- ui_components.py +16 -10
simple_data_loader.py
CHANGED
|
@@ -245,7 +245,6 @@ class SimpleLeaderboardViewer:
|
|
| 245 |
'acp-claude': 'Claude Code',
|
| 246 |
'acp-codex': 'Codex',
|
| 247 |
'acp-gemini': 'Gemini CLI',
|
| 248 |
-
'openhands_subagents': 'OpenHands Sub-agents',
|
| 249 |
}
|
| 250 |
alt_dir = self.config_path / "alternative_agents"
|
| 251 |
if alt_dir.exists():
|
|
@@ -253,6 +252,8 @@ class SimpleLeaderboardViewer:
|
|
| 253 |
if not type_dir.is_dir():
|
| 254 |
continue
|
| 255 |
default_name = agent_type_default_name.get(type_dir.name)
|
|
|
|
|
|
|
| 256 |
for agent_dir in type_dir.iterdir():
|
| 257 |
if not agent_dir.is_dir():
|
| 258 |
continue
|
|
|
|
| 245 |
'acp-claude': 'Claude Code',
|
| 246 |
'acp-codex': 'Codex',
|
| 247 |
'acp-gemini': 'Gemini CLI',
|
|
|
|
| 248 |
}
|
| 249 |
alt_dir = self.config_path / "alternative_agents"
|
| 250 |
if alt_dir.exists():
|
|
|
|
| 252 |
if not type_dir.is_dir():
|
| 253 |
continue
|
| 254 |
default_name = agent_type_default_name.get(type_dir.name)
|
| 255 |
+
if default_name is None:
|
| 256 |
+
continue # skip unlisted agent types (e.g. openhands_subagents)
|
| 257 |
for agent_dir in type_dir.iterdir():
|
| 258 |
if not agent_dir.is_dir():
|
| 259 |
continue
|
ui_components.py
CHANGED
|
@@ -954,7 +954,7 @@ def create_leaderboard_display(
|
|
| 954 |
if not new_df.empty:
|
| 955 |
new_transformer = DataTransformer(new_df, new_tag_map)
|
| 956 |
new_df_view_full, _ = new_transformer.view(tag=category_name, use_plotly=True)
|
| 957 |
-
|
| 958 |
# Prepare both complete and all entries versions
|
| 959 |
if 'Categories Attempted' in new_df_view_full.columns:
|
| 960 |
new_df_view_complete = new_df_view_full[new_df_view_full['Categories Attempted'] == '5/5'].copy()
|
|
@@ -1014,16 +1014,22 @@ def create_leaderboard_display(
|
|
| 1014 |
|
| 1015 |
# Connect the timer to the refresh function
|
| 1016 |
if show_incomplete_checkbox is not None:
|
| 1017 |
-
timer_inputs = [show_incomplete_checkbox]
|
| 1018 |
if show_open_only_checkbox is not None:
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
|
| 1022 |
-
|
| 1023 |
-
|
| 1024 |
-
|
| 1025 |
-
|
| 1026 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1027 |
else:
|
| 1028 |
# If no incomplete checkbox, always show all data (but still filter by open if needed)
|
| 1029 |
def check_and_refresh_all(show_open_only=False, mark_by=MARK_BY_DEFAULT, show_all_labels=False):
|
|
|
|
| 954 |
if not new_df.empty:
|
| 955 |
new_transformer = DataTransformer(new_df, new_tag_map)
|
| 956 |
new_df_view_full, _ = new_transformer.view(tag=category_name, use_plotly=True)
|
| 957 |
+
|
| 958 |
# Prepare both complete and all entries versions
|
| 959 |
if 'Categories Attempted' in new_df_view_full.columns:
|
| 960 |
new_df_view_complete = new_df_view_full[new_df_view_full['Categories Attempted'] == '5/5'].copy()
|
|
|
|
| 1014 |
|
| 1015 |
# Connect the timer to the refresh function
|
| 1016 |
if show_incomplete_checkbox is not None:
|
|
|
|
| 1017 |
if show_open_only_checkbox is not None:
|
| 1018 |
+
refresh_timer.tick(
|
| 1019 |
+
fn=check_and_refresh_data,
|
| 1020 |
+
inputs=[show_incomplete_checkbox, show_open_only_checkbox, mark_by_dropdown, show_all_labels_checkbox],
|
| 1021 |
+
outputs=[dataframe_component, cost_plot_component, runtime_plot_component]
|
| 1022 |
+
)
|
| 1023 |
+
else:
|
| 1024 |
+
# No open/closed split in this dataset — gr.State can't fill the gap in a
|
| 1025 |
+
# timer tick (no session context), so use a wrapper that fixes show_open_only=False.
|
| 1026 |
+
def _timer_refresh_no_open(show_incomplete, mark_by, show_all_labels):
|
| 1027 |
+
return check_and_refresh_data(show_incomplete, False, mark_by, show_all_labels)
|
| 1028 |
+
refresh_timer.tick(
|
| 1029 |
+
fn=_timer_refresh_no_open,
|
| 1030 |
+
inputs=[show_incomplete_checkbox, mark_by_dropdown, show_all_labels_checkbox],
|
| 1031 |
+
outputs=[dataframe_component, cost_plot_component, runtime_plot_component]
|
| 1032 |
+
)
|
| 1033 |
else:
|
| 1034 |
# If no incomplete checkbox, always show all data (but still filter by open if needed)
|
| 1035 |
def check_and_refresh_all(show_open_only=False, mark_by=MARK_BY_DEFAULT, show_all_labels=False):
|