Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,39 +26,16 @@ from src.display.utils import (
|
|
26 |
WeightType,
|
27 |
Precision
|
28 |
)
|
29 |
-
from src.envs import API,
|
30 |
-
from src.populate import
|
31 |
-
from src.submission.submit import add_new_eval
|
32 |
|
33 |
|
34 |
def restart_space():
|
35 |
API.restart_space(repo_id=REPO_ID)
|
36 |
|
37 |
-
|
38 |
-
print(EVAL_REQUESTS_PATH)
|
39 |
-
snapshot_download(
|
40 |
-
repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
41 |
-
)
|
42 |
-
except Exception:
|
43 |
-
restart_space()
|
44 |
-
try:
|
45 |
-
print(EVAL_RESULTS_PATH)
|
46 |
-
snapshot_download(
|
47 |
-
repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
48 |
-
)
|
49 |
-
except Exception:
|
50 |
-
restart_space()
|
51 |
-
|
52 |
-
|
53 |
-
raw_data, original_df = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
54 |
leaderboard_df = original_df.copy()
|
55 |
|
56 |
-
(
|
57 |
-
finished_eval_queue_df,
|
58 |
-
running_eval_queue_df,
|
59 |
-
pending_eval_queue_df,
|
60 |
-
) = get_evaluation_queue_df(EVAL_REQUESTS_PATH, EVAL_COLS)
|
61 |
-
|
62 |
|
63 |
# Searching and filtering
|
64 |
def update_table(
|
@@ -340,7 +317,7 @@ with demo:
|
|
340 |
# show_copy_button=True,
|
341 |
# )
|
342 |
|
343 |
-
scheduler = BackgroundScheduler()
|
344 |
-
scheduler.add_job(restart_space, "interval", seconds=1800)
|
345 |
-
scheduler.start()
|
346 |
demo.queue(default_concurrency_limit=40).launch()
|
|
|
26 |
WeightType,
|
27 |
Precision
|
28 |
)
|
29 |
+
from src.envs import API, DATA_PATH
|
30 |
+
from src.populate import get_leaderboard_df
|
|
|
31 |
|
32 |
|
33 |
def restart_space():
|
34 |
API.restart_space(repo_id=REPO_ID)
|
35 |
|
36 |
+
raw_data, original_df = get_leaderboard_df(DATA_PATH, COLS, BENCHMARK_COLS)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
leaderboard_df = original_df.copy()
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
# Searching and filtering
|
41 |
def update_table(
|
|
|
317 |
# show_copy_button=True,
|
318 |
# )
|
319 |
|
320 |
+
#scheduler = BackgroundScheduler()
|
321 |
+
#scheduler.add_job(restart_space, "interval", seconds=1800)
|
322 |
+
#scheduler.start()
|
323 |
demo.queue(default_concurrency_limit=40).launch()
|