“WadoodAbdul”
commited on
Commit
·
d330702
1
Parent(s):
3b24e83
Update submission validity check with model_name key
Browse files
src/submission/check_validity.py
CHANGED
@@ -98,12 +98,12 @@ def already_submitted_models(requested_models_dir: str) -> set[str]:
|
|
98 |
continue
|
99 |
with open(os.path.join(root, file), "r") as f:
|
100 |
info = json.load(f)
|
101 |
-
file_names.append(f"{info['
|
102 |
|
103 |
# Select organisation
|
104 |
-
if info["
|
105 |
continue
|
106 |
-
organisation, _ = info["
|
107 |
users_to_submission_dates[organisation].append(info["submitted_time"])
|
108 |
|
109 |
return set(file_names), users_to_submission_dates
|
|
|
98 |
continue
|
99 |
with open(os.path.join(root, file), "r") as f:
|
100 |
info = json.load(f)
|
101 |
+
file_names.append(f"{info['model_name']}_{info['revision']}")
|
102 |
|
103 |
# Select organisation
|
104 |
+
if info["model_name"].count("/") == 0 or "submitted_time" not in info:
|
105 |
continue
|
106 |
+
organisation, _ = info["model_name"].split("/")
|
107 |
users_to_submission_dates[organisation].append(info["submitted_time"])
|
108 |
|
109 |
return set(file_names), users_to_submission_dates
|