Spaces:
Runtime error
Runtime error
Commit
·
3cc2692
1
Parent(s):
d857bf2
leaderboard name added to env
Browse files- app.py +15 -15
- src/envs.py +1 -1
app.py
CHANGED
|
@@ -32,21 +32,21 @@ from src.submission.submit import add_new_eval
|
|
| 32 |
def restart_space():
|
| 33 |
API.restart_space(repo_id=REPO_ID)
|
| 34 |
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
|
| 51 |
|
| 52 |
LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
|
|
|
| 32 |
def restart_space():
|
| 33 |
API.restart_space(repo_id=REPO_ID)
|
| 34 |
|
| 35 |
+
## Space initialisation
|
| 36 |
+
try:
|
| 37 |
+
print(EVAL_REQUESTS_PATH)
|
| 38 |
+
snapshot_download(
|
| 39 |
+
repo_id=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
| 40 |
+
)
|
| 41 |
+
except Exception:
|
| 42 |
+
restart_space()
|
| 43 |
+
try:
|
| 44 |
+
print(EVAL_RESULTS_PATH)
|
| 45 |
+
snapshot_download(
|
| 46 |
+
repo_id=RESULTS_REPO, local_dir=EVAL_RESULTS_PATH, repo_type="dataset", tqdm_class=None, etag_timeout=30, token=TOKEN
|
| 47 |
+
)
|
| 48 |
+
except Exception:
|
| 49 |
+
restart_space()
|
| 50 |
|
| 51 |
|
| 52 |
LEADERBOARD_DF = get_leaderboard_df(EVAL_RESULTS_PATH, EVAL_REQUESTS_PATH, COLS, BENCHMARK_COLS)
|
src/envs.py
CHANGED
|
@@ -10,7 +10,7 @@ TOKEN = os.environ.get("HF_TOKEN") # A read/write token for your org
|
|
| 10 |
OWNER = "nvidia" # Change to your org - don't forget to create a results and request dataset, with the correct format!
|
| 11 |
# ----------------------------------
|
| 12 |
|
| 13 |
-
REPO_ID = f"{OWNER}/leaderboard"
|
| 14 |
QUEUE_REPO = f"{OWNER}/requests"
|
| 15 |
RESULTS_REPO = f"{OWNER}/llm-robustness-leaderboard-evals"
|
| 16 |
|
|
|
|
| 10 |
OWNER = "nvidia" # Change to your org - don't forget to create a results and request dataset, with the correct format!
|
| 11 |
# ----------------------------------
|
| 12 |
|
| 13 |
+
REPO_ID = f"{OWNER}/llm-robustness-leaderboard"
|
| 14 |
QUEUE_REPO = f"{OWNER}/requests"
|
| 15 |
RESULTS_REPO = f"{OWNER}/llm-robustness-leaderboard-evals"
|
| 16 |
|