Update src/submission/submit.py
Browse files- src/submission/submit.py +11 -9
src/submission/submit.py
CHANGED
|
@@ -240,15 +240,17 @@ def add_new_eval(
|
|
| 240 |
f.write(json.dumps(eval_entry))
|
| 241 |
|
| 242 |
print("Uploading eval file")
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
|
|
|
|
|
|
| 252 |
|
| 253 |
print("Creating git eval file")
|
| 254 |
OUT_DIR = f"{GIT_REQUESTS_PATH}/{user_name}"
|
|
|
|
| 240 |
f.write(json.dumps(eval_entry))
|
| 241 |
|
| 242 |
print("Uploading eval file")
|
| 243 |
+
try:
|
| 244 |
+
API.upload_file(
|
| 245 |
+
path_or_fileobj=out_path,
|
| 246 |
+
path_in_repo=out_path.split("eval-queue/")[1],
|
| 247 |
+
repo_id=QUEUE_REPO,
|
| 248 |
+
repo_type="dataset",
|
| 249 |
+
commit_message=f"Add {model} to eval queue",
|
| 250 |
+
)
|
| 251 |
+
except Exception as e:
|
| 252 |
+
print(str(e))
|
| 253 |
+
print("upload error........")
|
| 254 |
|
| 255 |
print("Creating git eval file")
|
| 256 |
OUT_DIR = f"{GIT_REQUESTS_PATH}/{user_name}"
|