Spaces:
Running
Running
yangzhitao
commited on
Commit
·
36e7351
1
Parent(s):
7b47b0b
fix: fix model column display
Browse files- src/leaderboard/read_evals.py +1 -1
- src/prepare.py +4 -0
src/leaderboard/read_evals.py
CHANGED
|
@@ -92,7 +92,7 @@ class EvalResult(BaseModel):
|
|
| 92 |
|
| 93 |
# update full_model from meta_toml if it exists
|
| 94 |
if "/" not in full_model:
|
| 95 |
-
full_model = meta_toml.
|
| 96 |
|
| 97 |
still_on_hub, _, model_config = is_model_on_hub(
|
| 98 |
full_model, config.model_sha or "main", trust_remote_code=True, test_tokenizer=False
|
|
|
|
| 92 |
|
| 93 |
# update full_model from meta_toml if it exists
|
| 94 |
if "/" not in full_model:
|
| 95 |
+
full_model = meta_toml.model_key_to_title.get(full_model, full_model)
|
| 96 |
|
| 97 |
still_on_hub, _, model_config = is_model_on_hub(
|
| 98 |
full_model, config.model_sha or "main", trust_remote_code=True, test_tokenizer=False
|
src/prepare.py
CHANGED
|
@@ -75,6 +75,10 @@ class MetaToml(BaseModel):
|
|
| 75 |
def model_key_to_repo_id(self) -> dict[str, str]:
|
| 76 |
return {model.key: model.repo_id for model in self.model_repos if model.repo_id is not None}
|
| 77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
@cached_property
|
| 79 |
def model_title_to_repo_id(self) -> dict[str, str]:
|
| 80 |
mapping: dict[str, str] = {}
|
|
|
|
| 75 |
def model_key_to_repo_id(self) -> dict[str, str]:
|
| 76 |
return {model.key: model.repo_id for model in self.model_repos if model.repo_id is not None}
|
| 77 |
|
| 78 |
+
@cached_property
|
| 79 |
+
def model_key_to_title(self) -> dict[str, str]:
|
| 80 |
+
return {model.key: model.title for model in self.models}
|
| 81 |
+
|
| 82 |
@cached_property
|
| 83 |
def model_title_to_repo_id(self) -> dict[str, str]:
|
| 84 |
mapping: dict[str, str] = {}
|