Spaces:
Sleeping
Sleeping
- src/populate.py +19 -18
- src/submission/submit.py +1 -1
src/populate.py
CHANGED
@@ -41,29 +41,30 @@ def get_leaderboard_df(results_path: str, requests_path: str, cols: list, benchm
|
|
41 |
def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
|
42 |
"""Creates the different dataframes for the evaluation queues requestes"""
|
43 |
entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
|
|
|
44 |
all_evals = []
|
45 |
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
|
52 |
-
|
53 |
-
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
|
68 |
pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
|
69 |
running_list = [e for e in all_evals if e["status"] == "RUNNING"]
|
|
|
41 |
def get_evaluation_queue_df(save_path: str, cols: list) -> list[pd.DataFrame]:
|
42 |
"""Creates the different dataframes for the evaluation queues requestes"""
|
43 |
entries = [entry for entry in os.listdir(save_path) if not entry.startswith(".")]
|
44 |
+
print(entries)
|
45 |
all_evals = []
|
46 |
|
47 |
+
for entry in entries:
|
48 |
+
if ".json" in entry:
|
49 |
+
file_path = os.path.join(save_path, entry)
|
50 |
+
with open(file_path) as fp:
|
51 |
+
data = json.load(fp)
|
52 |
|
53 |
+
data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])
|
54 |
+
data[EvalQueueColumn.revision.name] = data.get("revision", "main")
|
55 |
|
56 |
+
all_evals.append(data)
|
57 |
+
elif ".md" not in entry:
|
58 |
+
# this is a folder
|
59 |
+
sub_entries = [e for e in os.listdir(f"{save_path}/{entry}") if not e.startswith(".")]
|
60 |
+
for sub_entry in sub_entries:
|
61 |
+
file_path = os.path.join(save_path, entry, sub_entry)
|
62 |
+
with open(file_path) as fp:
|
63 |
+
data = json.load(fp)
|
64 |
|
65 |
+
data[EvalQueueColumn.model.name] = make_clickable_model(data["model"])
|
66 |
+
data[EvalQueueColumn.revision.name] = data.get("revision", "main")
|
67 |
+
all_evals.append(data)
|
68 |
|
69 |
pending_list = [e for e in all_evals if e["status"] in ["PENDING", "RERUN"]]
|
70 |
running_list = [e for e in all_evals if e["status"] == "RUNNING"]
|
src/submission/submit.py
CHANGED
@@ -35,7 +35,7 @@ def add_new_eval(
|
|
35 |
if revision_name == "":
|
36 |
revision_name = "main"
|
37 |
|
38 |
-
folder_path = f"{model_name}_{datetime.now()}"
|
39 |
file_name = f"pred.json"
|
40 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
41 |
|
|
|
35 |
if revision_name == "":
|
36 |
revision_name = "main"
|
37 |
|
38 |
+
folder_path = f"entry_{model_name}_{datetime.now()}"
|
39 |
file_name = f"pred.json"
|
40 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
41 |
|