Spaces:
Running
Running
fix: ensure that baselines show up across filters
Browse files
app.py
CHANGED
|
@@ -200,13 +200,14 @@ def update_leaderboard(show_percentage, selected_groups, compact_view, cached_df
|
|
| 200 |
# Use cached dataframe instead of re-downloading
|
| 201 |
df_to_format = cached_df.copy()
|
| 202 |
|
| 203 |
-
# Apply training set filter
|
|
|
|
| 204 |
if training_set_filter and training_set_filter != "All" and 'training_set' in df_to_format.columns:
|
| 205 |
-
|
| 206 |
-
df_to_format['training_set'].apply(
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
]
|
| 210 |
|
| 211 |
# Convert display name back to raw column name for sorting
|
| 212 |
if sort_by and sort_by != "None":
|
|
|
|
| 200 |
# Use cached dataframe instead of re-downloading
|
| 201 |
df_to_format = cached_df.copy()
|
| 202 |
|
| 203 |
+
# Apply training set filter (baselines always shown regardless of filter)
|
| 204 |
+
ALWAYS_SHOW_MODELS = {'AFLOW', 'Alexandria', 'OQMD'}
|
| 205 |
if training_set_filter and training_set_filter != "All" and 'training_set' in df_to_format.columns:
|
| 206 |
+
mask = (
|
| 207 |
+
df_to_format['training_set'].apply(lambda x: training_set_filter in parse_training_set(x)) |
|
| 208 |
+
df_to_format['model_name'].isin(ALWAYS_SHOW_MODELS)
|
| 209 |
+
)
|
| 210 |
+
df_to_format = df_to_format[mask]
|
| 211 |
|
| 212 |
# Convert display name back to raw column name for sorting
|
| 213 |
if sort_by and sort_by != "None":
|