Spaces:
Running
Running
Added more model attributes to the leaderboard table
Browse files
server.py
CHANGED
@@ -839,8 +839,14 @@ class LeaderboardServer:
|
|
839 |
local_results["model"] = f'<a href={xmlQuoteAttr(model_link)} title={xmlQuoteAttr(model_title)}>{model_title_abbr_html}</a>'
|
840 |
|
841 |
if to_csv:
|
842 |
-
|
843 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
844 |
|
845 |
release = data["submission_metadata"].get("submission_timestamp")
|
846 |
release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
|
@@ -866,6 +872,10 @@ class LeaderboardServer:
|
|
866 |
"precision": "Precision",
|
867 |
"description": "Description",
|
868 |
"link_to_model": "Link to model",
|
|
|
|
|
|
|
|
|
869 |
}
|
870 |
first_attributes = [
|
871 |
"model",
|
@@ -874,6 +884,9 @@ class LeaderboardServer:
|
|
874 |
"model_type",
|
875 |
"parameters",
|
876 |
"n-shot",
|
|
|
|
|
|
|
877 |
"average_score",
|
878 |
]
|
879 |
|
|
|
839 |
local_results["model"] = f'<a href={xmlQuoteAttr(model_link)} title={xmlQuoteAttr(model_title)}>{model_title_abbr_html}</a>'
|
840 |
|
841 |
if to_csv:
|
842 |
+
metadata_default_value = ""
|
843 |
+
else:
|
844 |
+
metadata_default_value = "N/A"
|
845 |
+
|
846 |
+
for attr in ["n-shot", "fewshot_as_multiturn", "max_length", "chat_template"]:
|
847 |
+
attr_val = data["metadata"].get(attr, metadata_default_value)
|
848 |
+
attr_val = attr_val if attr_val != None else "null"
|
849 |
+
local_results[attr] = attr_val
|
850 |
|
851 |
release = data["submission_metadata"].get("submission_timestamp")
|
852 |
release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
|
|
|
872 |
"precision": "Precision",
|
873 |
"description": "Description",
|
874 |
"link_to_model": "Link to model",
|
875 |
+
"n-shot": "N-shot",
|
876 |
+
"fewshot_as_multiturn": "FAM",
|
877 |
+
"max_length": "ML",
|
878 |
+
"chat_template": "CAT",
|
879 |
}
|
880 |
first_attributes = [
|
881 |
"model",
|
|
|
884 |
"model_type",
|
885 |
"parameters",
|
886 |
"n-shot",
|
887 |
+
"fewshot_as_multiturn",
|
888 |
+
"max_length",
|
889 |
+
"chat_template",
|
890 |
"average_score",
|
891 |
]
|
892 |
|