Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
shigeki Ishida
commited on
Commit
·
456d9a1
1
Parent(s):
c58b612
fix get llm-jp-eval version
Browse files
src/submission/check_validity.py
CHANGED
@@ -8,6 +8,8 @@ from huggingface_hub.hf_api import ModelInfo
|
|
8 |
from transformers import AutoConfig
|
9 |
from transformers.models.auto.tokenization_auto import AutoTokenizer
|
10 |
|
|
|
|
|
11 |
|
12 |
def check_model_card(repo_id: str) -> tuple[bool, str]:
|
13 |
"""Checks if the model card and license exist and have been filled"""
|
@@ -98,12 +100,10 @@ def already_submitted_models(requested_models_dir: str) -> set[str]:
|
|
98 |
info = json.load(f)
|
99 |
if info["status"] == "FAILED":
|
100 |
continue
|
101 |
-
file_names.append(f"{info['model']}_{info['precision']}_{info['add_special_tokens']}")
|
102 |
|
103 |
-
#
|
104 |
-
|
105 |
-
|
106 |
-
)
|
107 |
|
108 |
# Select organisation
|
109 |
if info["model"].count("/") == 0 or "submitted_time" not in info:
|
|
|
8 |
from transformers import AutoConfig
|
9 |
from transformers.models.auto.tokenization_auto import AutoTokenizer
|
10 |
|
11 |
+
from src.display.utils import Version
|
12 |
+
|
13 |
|
14 |
def check_model_card(repo_id: str) -> tuple[bool, str]:
|
15 |
"""Checks if the model card and license exist and have been filled"""
|
|
|
100 |
info = json.load(f)
|
101 |
if info["status"] == "FAILED":
|
102 |
continue
|
|
|
103 |
|
104 |
+
# Version.v1_4_1.value.name を使用してバージョン情報を取得
|
105 |
+
version = info.get("llm_jp_eval_version", Version.v1_4_1.value.name)
|
106 |
+
file_names.append(f"{info['model']}_{info['precision']}_{info['add_special_tokens']}_{version}")
|
|
|
107 |
|
108 |
# Select organisation
|
109 |
if info["model"].count("/") == 0 or "submitted_time" not in info:
|