lvkaokao
commited on
Commit
•
ac138f8
1
Parent(s):
fd7d6d0
requests backup on huggingface/dataset.
Browse files- src/submission/submit.py +20 -1
src/submission/submit.py
CHANGED
@@ -196,7 +196,26 @@ def add_new_eval(
|
|
196 |
# if f"{model}_{revision}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}" in REQUESTED_MODELS:
|
197 |
# return styled_warning("This model has been already submitted.")
|
198 |
|
199 |
-
print("Creating eval file")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
200 |
OUT_DIR = f"{GIT_REQUESTS_PATH}/{user_name}"
|
201 |
os.makedirs(OUT_DIR, exist_ok=True)
|
202 |
req_out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json"
|
|
|
196 |
# if f"{model}_{revision}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}" in REQUESTED_MODELS:
|
197 |
# return styled_warning("This model has been already submitted.")
|
198 |
|
199 |
+
print("Creating huggingface/dataset eval file")
|
200 |
+
OUT_DIR = f"{EVAL_REQUESTS_PATH}/{user_name}"
|
201 |
+
os.makedirs(OUT_DIR, exist_ok=True)
|
202 |
+
out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json"
|
203 |
+
|
204 |
+
with open(out_path, "w") as f:
|
205 |
+
f.write(json.dumps(eval_entry))
|
206 |
+
|
207 |
+
print("Uploading eval file")
|
208 |
+
|
209 |
+
API.upload_file(
|
210 |
+
path_or_fileobj=out_path,
|
211 |
+
path_in_repo=out_path.split("eval-queue/")[1],
|
212 |
+
repo_id=QUEUE_REPO,
|
213 |
+
repo_type="dataset",
|
214 |
+
commit_message=f"Add {model} to eval queue",
|
215 |
+
)
|
216 |
+
|
217 |
+
|
218 |
+
print("Creating git eval file")
|
219 |
OUT_DIR = f"{GIT_REQUESTS_PATH}/{user_name}"
|
220 |
os.makedirs(OUT_DIR, exist_ok=True)
|
221 |
req_out_path = f"{OUT_DIR}/{model_path}_eval_request_{private}_{quant_type}_{precision}_{weight_dtype}_{compute_dtype}.json"
|