mode
Browse files- app.py +1 -1
- src/display/utils.py +1 -0
- src/leaderboard/processor.py +2 -1
app.py
CHANGED
@@ -264,6 +264,7 @@ def init_leaderboard(dataframe, visible_columns=None):
|
|
264 |
|
265 |
# Select only the visible columns for display
|
266 |
visible_columns.remove('model_name')
|
|
|
267 |
visible_columns = ['model_name'] + visible_columns
|
268 |
display_df = dataframe[visible_columns].copy()
|
269 |
|
@@ -583,7 +584,6 @@ def update_visualization(selected_models, selected_category, selected_metric, ve
|
|
583 |
# Create Gradio app
|
584 |
demo = gr.Blocks(css=custom_css, theme=custom_theme)
|
585 |
|
586 |
-
# Mapping from original category names to display names
|
587 |
CATEGORY_DISPLAY_MAP = {
|
588 |
'Political Corruption and Legal Evasion': 'Corruption & Legal Evasion',
|
589 |
'Financial Fraud and Unethical Business': 'Financial Fraud',
|
|
|
264 |
|
265 |
# Select only the visible columns for display
|
266 |
visible_columns.remove('model_name')
|
267 |
+
|
268 |
visible_columns = ['model_name'] + visible_columns
|
269 |
display_df = dataframe[visible_columns].copy()
|
270 |
|
|
|
584 |
# Create Gradio app
|
585 |
demo = gr.Blocks(css=custom_css, theme=custom_theme)
|
586 |
|
|
|
587 |
CATEGORY_DISPLAY_MAP = {
|
588 |
'Political Corruption and Legal Evasion': 'Corruption & Legal Evasion',
|
589 |
'Financial Fraud and Unethical Business': 'Financial Fraud',
|
src/display/utils.py
CHANGED
@@ -59,6 +59,7 @@ class Precision(Enum):
|
|
59 |
float32 = auto()
|
60 |
int8 = auto()
|
61 |
int4 = auto()
|
|
|
62 |
|
63 |
def __str__(self):
|
64 |
"""String representation of the precision type."""
|
|
|
59 |
float32 = auto()
|
60 |
int8 = auto()
|
61 |
int4 = auto()
|
62 |
+
NA = auto()
|
63 |
|
64 |
def __str__(self):
|
65 |
"""String representation of the precision type."""
|
src/leaderboard/processor.py
CHANGED
@@ -169,13 +169,14 @@ def leaderboard_to_dataframe(leaderboard_data: Dict) -> pd.DataFrame:
|
|
169 |
row = {
|
170 |
"model_name": model_name,
|
171 |
"model_type": entry.get("model_type", "Unknown"),
|
|
|
172 |
"submission_date": entry.get("submission_date", ""),
|
173 |
"version": entry.get("version", "v0"),
|
174 |
"guard_model_type": entry.get("guard_model_type", "llm_regexp").lower()
|
175 |
}
|
176 |
|
177 |
# Add additional metadata fields if present
|
178 |
-
for key in ["base_model", "revision", "precision", "weight_type"
|
179 |
if key in entry:
|
180 |
row[key] = entry[key]
|
181 |
|
|
|
169 |
row = {
|
170 |
"model_name": model_name,
|
171 |
"model_type": entry.get("model_type", "Unknown"),
|
172 |
+
"mode": entry.get("mode", "Strict"),
|
173 |
"submission_date": entry.get("submission_date", ""),
|
174 |
"version": entry.get("version", "v0"),
|
175 |
"guard_model_type": entry.get("guard_model_type", "llm_regexp").lower()
|
176 |
}
|
177 |
|
178 |
# Add additional metadata fields if present
|
179 |
+
for key in ["base_model", "revision", "precision", "weight_type"]:
|
180 |
if key in entry:
|
181 |
row[key] = entry[key]
|
182 |
|