Spaces:
Runtime error
Runtime error
Clémentine
commited on
Commit
•
2c6b933
1
Parent(s):
a244751
grab dynamic file before updating at submission time
Browse files- src/submission/submit.py +6 -1
src/submission/submit.py
CHANGED
@@ -2,7 +2,7 @@ import json
|
|
2 |
import os
|
3 |
from datetime import datetime, timezone
|
4 |
|
5 |
-
from huggingface_hub import ModelCard
|
6 |
|
7 |
from src.display.formatting import styled_error, styled_message, styled_warning
|
8 |
from src.envs import API, EVAL_REQUESTS_PATH, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, DYNAMIC_INFO_REPO, H4_TOKEN, QUEUE_REPO, RATE_LIMIT_PERIOD, RATE_LIMIT_QUOTA
|
@@ -172,6 +172,11 @@ def add_new_eval(
|
|
172 |
commit_message=f"Add {model} to eval queue",
|
173 |
)
|
174 |
|
|
|
|
|
|
|
|
|
|
|
175 |
with open(DYNAMIC_INFO_FILE_PATH) as f:
|
176 |
all_supplementary_info = json.load(f)
|
177 |
|
|
|
2 |
import os
|
3 |
from datetime import datetime, timezone
|
4 |
|
5 |
+
from huggingface_hub import ModelCard, snapshot_download
|
6 |
|
7 |
from src.display.formatting import styled_error, styled_message, styled_warning
|
8 |
from src.envs import API, EVAL_REQUESTS_PATH, DYNAMIC_INFO_PATH, DYNAMIC_INFO_FILE_PATH, DYNAMIC_INFO_REPO, H4_TOKEN, QUEUE_REPO, RATE_LIMIT_PERIOD, RATE_LIMIT_QUOTA
|
|
|
172 |
commit_message=f"Add {model} to eval queue",
|
173 |
)
|
174 |
|
175 |
+
# We want to grab the latest version of the submission file to not accidentally overwrite it
|
176 |
+
snapshot_download(
|
177 |
+
repo_id=DYNAMIC_INFO_REPO, local_dir=DYNAMIC_INFO_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30
|
178 |
+
)
|
179 |
+
|
180 |
with open(DYNAMIC_INFO_FILE_PATH) as f:
|
181 |
all_supplementary_info = json.load(f)
|
182 |
|