Nathan Habib
commited on
Commit
•
280033c
1
Parent(s):
0f4fbd6
fix disapearing models
Browse files
src/get_model_info/apply_metadata_to_df.py
CHANGED
@@ -46,6 +46,8 @@ def get_model_metadata(leaderboard_data: List[dict]):
|
|
46 |
model_data[AutoEvalColumn.likes.name] = request.get("likes", 0)
|
47 |
model_data[AutoEvalColumn.params.name] = request.get("params", 0)
|
48 |
except Exception:
|
|
|
|
|
49 |
if model_data["model_name_for_query"] in MODEL_TYPE_METADATA:
|
50 |
model_data[AutoEvalColumn.model_type.name] = MODEL_TYPE_METADATA[
|
51 |
model_data["model_name_for_query"]
|
@@ -57,6 +59,11 @@ def get_model_metadata(leaderboard_data: List[dict]):
|
|
57 |
model_data[AutoEvalColumn.model_type.name] = ModelType.Unknown.value.name
|
58 |
model_data[AutoEvalColumn.model_type_symbol.name] = ModelType.Unknown.value.symbol
|
59 |
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
def flag_models(leaderboard_data: List[dict]):
|
62 |
for model_data in leaderboard_data:
|
|
|
46 |
model_data[AutoEvalColumn.likes.name] = request.get("likes", 0)
|
47 |
model_data[AutoEvalColumn.params.name] = request.get("params", 0)
|
48 |
except Exception:
|
49 |
+
print(f"Could not find request file for {model_data['model_name_for_query']}")
|
50 |
+
|
51 |
if model_data["model_name_for_query"] in MODEL_TYPE_METADATA:
|
52 |
model_data[AutoEvalColumn.model_type.name] = MODEL_TYPE_METADATA[
|
53 |
model_data["model_name_for_query"]
|
|
|
59 |
model_data[AutoEvalColumn.model_type.name] = ModelType.Unknown.value.name
|
60 |
model_data[AutoEvalColumn.model_type_symbol.name] = ModelType.Unknown.value.symbol
|
61 |
|
62 |
+
# if we cannot find a request file, set license and likes to unknown
|
63 |
+
model_data[AutoEvalColumn.license.name] = "?"
|
64 |
+
model_data[AutoEvalColumn.likes.name] = 0
|
65 |
+
model_data[AutoEvalColumn.params.name] = 0
|
66 |
+
|
67 |
|
68 |
def flag_models(leaderboard_data: List[dict]):
|
69 |
for model_data in leaderboard_data:
|