Spaces:
Running
Running
Heatmap: Added model_size_threshold constant
Browse files
server.py
CHANGED
|
@@ -841,7 +841,8 @@ class LeaderboardServer:
|
|
| 841 |
original_scores = original_scores.loc[sorted_indices] # Sort rows by model size
|
| 842 |
|
| 843 |
# Bigger models
|
| 844 |
-
|
|
|
|
| 845 |
|
| 846 |
# Apply quantile transformation independently for each row
|
| 847 |
normalized_scores_sub = original_scores_sub.apply(lambda x: (x - x.min()) / (x.max() - x.min()), axis=0)
|
|
@@ -852,13 +853,13 @@ class LeaderboardServer:
|
|
| 852 |
p1 = create_heatmap(
|
| 853 |
normalized_scores_sub,
|
| 854 |
original_scores_sub * 100,
|
| 855 |
-
x_axis_label="Models ≥
|
| 856 |
y_axis_label=fig_y_axis_label,
|
| 857 |
transpose=transpose,
|
| 858 |
)
|
| 859 |
|
| 860 |
# Smaller models
|
| 861 |
-
original_scores_sub = original_scores[sizes_series <
|
| 862 |
|
| 863 |
# Apply quantile transformation independently for each row
|
| 864 |
normalized_scores_sub = original_scores_sub.apply(lambda x: (x - x.min()) / (x.max() - x.min()), axis=0)
|
|
@@ -867,7 +868,7 @@ class LeaderboardServer:
|
|
| 867 |
p2 = create_heatmap(
|
| 868 |
normalized_scores_sub,
|
| 869 |
original_scores_sub * 100,
|
| 870 |
-
x_axis_label="Models <
|
| 871 |
y_axis_label=fig_y_axis_label,
|
| 872 |
y_axis_visible=False,
|
| 873 |
transpose=transpose,
|
|
|
|
| 841 |
original_scores = original_scores.loc[sorted_indices] # Sort rows by model size
|
| 842 |
|
| 843 |
# Bigger models
|
| 844 |
+
model_size_threshold = 16
|
| 845 |
+
original_scores_sub = original_scores[sizes_series >= model_size_threshold]
|
| 846 |
|
| 847 |
# Apply quantile transformation independently for each row
|
| 848 |
normalized_scores_sub = original_scores_sub.apply(lambda x: (x - x.min()) / (x.max() - x.min()), axis=0)
|
|
|
|
| 853 |
p1 = create_heatmap(
|
| 854 |
normalized_scores_sub,
|
| 855 |
original_scores_sub * 100,
|
| 856 |
+
x_axis_label=f"Models ≥{model_size_threshold}B",
|
| 857 |
y_axis_label=fig_y_axis_label,
|
| 858 |
transpose=transpose,
|
| 859 |
)
|
| 860 |
|
| 861 |
# Smaller models
|
| 862 |
+
original_scores_sub = original_scores[sizes_series < model_size_threshold]
|
| 863 |
|
| 864 |
# Apply quantile transformation independently for each row
|
| 865 |
normalized_scores_sub = original_scores_sub.apply(lambda x: (x - x.min()) / (x.max() - x.min()), axis=0)
|
|
|
|
| 868 |
p2 = create_heatmap(
|
| 869 |
normalized_scores_sub,
|
| 870 |
original_scores_sub * 100,
|
| 871 |
+
x_axis_label=f"Models <{model_size_threshold}B",
|
| 872 |
y_axis_label=fig_y_axis_label,
|
| 873 |
y_axis_visible=False,
|
| 874 |
transpose=transpose,
|