Spaces:
Running
Running
openhands
commited on
Commit
·
d17eff0
1
Parent(s):
49f9739
Only show 'Detailed Benchmark Results' when more than one benchmark exists
Browse files- Modified create_benchmark_details_display to check benchmark count
- If category has 1 or fewer benchmarks, skip showing the detailed section
- Updated docstring to reflect this behavior
- ui_components.py +3 -2
ui_components.py
CHANGED
|
@@ -1074,6 +1074,7 @@ def create_benchmark_details_display(
|
|
| 1074 |
"""
|
| 1075 |
Generates a detailed breakdown for each benchmark within a given category.
|
| 1076 |
For each benchmark, it creates a title, a filtered table, and a scatter plot.
|
|
|
|
| 1077 |
Args:
|
| 1078 |
full_df (pd.DataFrame): The complete, "pretty" dataframe for the entire split.
|
| 1079 |
tag_map (dict): The "pretty" tag map to find the list of benchmarks.
|
|
@@ -1082,8 +1083,8 @@ def create_benchmark_details_display(
|
|
| 1082 |
# 1. Get the list of benchmarks for the selected category
|
| 1083 |
benchmark_names = tag_map.get(category_name, [])
|
| 1084 |
|
| 1085 |
-
if
|
| 1086 |
-
|
| 1087 |
return
|
| 1088 |
|
| 1089 |
gr.HTML(f'<h2 class="benchmark-main-subtitle">{category_name} Detailed Benchmark Results</h2>')
|
|
|
|
| 1074 |
"""
|
| 1075 |
Generates a detailed breakdown for each benchmark within a given category.
|
| 1076 |
For each benchmark, it creates a title, a filtered table, and a scatter plot.
|
| 1077 |
+
Only shows the detailed results if there is more than one benchmark in the category.
|
| 1078 |
Args:
|
| 1079 |
full_df (pd.DataFrame): The complete, "pretty" dataframe for the entire split.
|
| 1080 |
tag_map (dict): The "pretty" tag map to find the list of benchmarks.
|
|
|
|
| 1083 |
# 1. Get the list of benchmarks for the selected category
|
| 1084 |
benchmark_names = tag_map.get(category_name, [])
|
| 1085 |
|
| 1086 |
+
# Only show detailed results if there is more than one benchmark
|
| 1087 |
+
if len(benchmark_names) <= 1:
|
| 1088 |
return
|
| 1089 |
|
| 1090 |
gr.HTML(f'<h2 class="benchmark-main-subtitle">{category_name} Detailed Benchmark Results</h2>')
|