Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -29,21 +29,18 @@ from src.display.utils import (
|
|
29 |
AutoEvalColumn_mib,
|
30 |
fields,
|
31 |
)
|
32 |
-
from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID,
|
33 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df, get_leaderboard_df_mib
|
34 |
from src.submission.submit import add_new_eval
|
35 |
|
36 |
-
|
37 |
|
38 |
def restart_space():
|
39 |
API.restart_space(repo_id=REPO_ID)
|
40 |
-
|
41 |
-
print("end restart_space")
|
42 |
|
43 |
|
44 |
-
|
45 |
### Space initialisation
|
46 |
-
print("EVAL_REQUESTS_PATH")
|
47 |
try:
|
48 |
print(EVAL_REQUESTS_PATH)
|
49 |
snapshot_download(
|
@@ -52,16 +49,16 @@ try:
|
|
52 |
except Exception:
|
53 |
restart_space()
|
54 |
|
55 |
-
print("EVAL_RESULTS_PATH")
|
56 |
-
try:
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
except Exception:
|
62 |
-
|
|
|
63 |
|
64 |
-
print("RESULTS_REPO_MIB_SUBGRAPH")
|
65 |
try:
|
66 |
print(RESULTS_REPO_MIB_SUBGRAPH)
|
67 |
snapshot_download(
|
@@ -79,7 +76,6 @@ try:
|
|
79 |
except Exception:
|
80 |
restart_space()
|
81 |
|
82 |
-
print("End Space initialisation ")
|
83 |
|
84 |
|
85 |
LEADERBOARD_DF_MIB_SUBGRAPH = get_leaderboard_df_mib(EVAL_RESULTS_MIB_SUBGRAPH_PATH, EVAL_REQUESTS_PATH, COLS_MIB, BENCHMARK_COLS_MIB)
|
|
|
29 |
AutoEvalColumn_mib,
|
30 |
fields,
|
31 |
)
|
32 |
+
from src.envs import API, EVAL_REQUESTS_PATH, EVAL_RESULTS_PATH, QUEUE_REPO, REPO_ID, TOKEN, RESULTS_REPO_MIB_SUBGRAPH, EVAL_RESULTS_MIB_SUBGRAPH_PATH, RESULTS_REPO_MIB_CAUSALGRAPH, EVAL_RESULTS_MIB_CAUSALGRAPH_PATH
|
33 |
from src.populate import get_evaluation_queue_df, get_leaderboard_df, get_leaderboard_df_mib
|
34 |
from src.submission.submit import add_new_eval
|
35 |
|
36 |
+
|
37 |
|
38 |
def restart_space():
|
39 |
API.restart_space(repo_id=REPO_ID)
|
|
|
|
|
40 |
|
41 |
|
42 |
+
|
43 |
### Space initialisation
|
|
|
44 |
try:
|
45 |
print(EVAL_REQUESTS_PATH)
|
46 |
snapshot_download(
|
|
|
49 |
except Exception:
|
50 |
restart_space()
|
51 |
|
52 |
+
# print("EVAL_RESULTS_PATH")
|
53 |
+
# try:
|
54 |
+
# print(EVAL_RESULTS_PATH)
|
55 |
+
# snapshot_download(
|
56 |
+
# repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
57 |
+
# )
|
58 |
+
# except Exception:
|
59 |
+
# restart_space()
|
60 |
+
|
61 |
|
|
|
62 |
try:
|
63 |
print(RESULTS_REPO_MIB_SUBGRAPH)
|
64 |
snapshot_download(
|
|
|
76 |
except Exception:
|
77 |
restart_space()
|
78 |
|
|
|
79 |
|
80 |
|
81 |
LEADERBOARD_DF_MIB_SUBGRAPH = get_leaderboard_df_mib(EVAL_RESULTS_MIB_SUBGRAPH_PATH, EVAL_REQUESTS_PATH, COLS_MIB, BENCHMARK_COLS_MIB)
|