pminervini commited on
Commit
b34c95e
1 Parent(s): 3567246
Files changed (2) hide show
  1. backend-cli.py +13 -2
  2. src/utils.py +0 -11
backend-cli.py CHANGED
@@ -7,7 +7,7 @@ import random
7
  from datetime import datetime
8
 
9
  from src.backend.run_eval_suite import run_evaluation
10
- from src.backend.manage_requests import check_completed_evals, get_eval_requests
11
  from src.backend.sort_queue import sort_models_by_priority
12
  from src.backend.envs import Tasks, EVAL_REQUESTS_PATH_BACKEND, EVAL_RESULTS_PATH_BACKEND, DEVICE, LIMIT, Task
13
 
@@ -15,11 +15,22 @@ from src.backend.manage_requests import EvalRequest
15
  from src.leaderboard.read_evals import EvalResult
16
 
17
  from src.envs import QUEUE_REPO, RESULTS_REPO, API
18
- from src.utils import my_snapshot_download, my_set_eval_request
19
 
20
  import logging
21
  import pprint
22
 
 
 
 
 
 
 
 
 
 
 
 
23
  logging.getLogger("openai").setLevel(logging.WARNING)
24
 
25
  logging.basicConfig(level=logging.ERROR)
 
7
  from datetime import datetime
8
 
9
  from src.backend.run_eval_suite import run_evaluation
10
+ from src.backend.manage_requests import check_completed_evals, get_eval_requests, set_eval_request
11
  from src.backend.sort_queue import sort_models_by_priority
12
  from src.backend.envs import Tasks, EVAL_REQUESTS_PATH_BACKEND, EVAL_RESULTS_PATH_BACKEND, DEVICE, LIMIT, Task
13
 
 
15
  from src.leaderboard.read_evals import EvalResult
16
 
17
  from src.envs import QUEUE_REPO, RESULTS_REPO, API
18
+ from src.utils import my_snapshot_download
19
 
20
  import logging
21
  import pprint
22
 
23
+
24
+ def my_set_eval_request(api, eval_request, set_to_status, hf_repo, local_dir):
25
+ for i in range(10):
26
+ try:
27
+ set_eval_request(api=api, eval_request=eval_request, set_to_status=set_to_status, hf_repo=hf_repo, local_dir=local_dir)
28
+ return
29
+ except Exception:
30
+ time.sleep(60)
31
+ return
32
+
33
+
34
  logging.getLogger("openai").setLevel(logging.WARNING)
35
 
36
  logging.basicConfig(level=logging.ERROR)
src/utils.py CHANGED
@@ -1,5 +1,4 @@
1
  from huggingface_hub import snapshot_download
2
- from src.backend.manage_requests import set_eval_request
3
  import time
4
 
5
 
@@ -11,13 +10,3 @@ def my_snapshot_download(repo_id, revision, local_dir, repo_type, max_workers):
11
  except Exception:
12
  time.sleep(60)
13
  return
14
-
15
-
16
- def my_set_eval_request(api, eval_request, set_to_status, hf_repo, local_dir):
17
- for i in range(10):
18
- try:
19
- set_eval_request(api=api, eval_request=eval_request, set_to_status=set_to_status, hf_repo=hf_repo, local_dir=local_dir)
20
- return
21
- except Exception:
22
- time.sleep(60)
23
- return
 
1
  from huggingface_hub import snapshot_download
 
2
  import time
3
 
4
 
 
10
  except Exception:
11
  time.sleep(60)
12
  return