Update main_backend.py
Browse files- main_backend.py +14 -10
main_backend.py
CHANGED
|
@@ -29,16 +29,6 @@ def run_auto_eval():
|
|
| 29 |
|
| 30 |
# pull the eval dataset from the hub and parse any eval requests
|
| 31 |
# check completed evals and set them to finished
|
| 32 |
-
check_completed_evals(
|
| 33 |
-
api=API,
|
| 34 |
-
checked_status=RUNNING_STATUS,
|
| 35 |
-
completed_status=FINISHED_STATUS,
|
| 36 |
-
failed_status=FAILED_STATUS,
|
| 37 |
-
hf_repo=QUEUE_REPO,
|
| 38 |
-
local_dir=EVAL_REQUESTS_PATH_BACKEND,
|
| 39 |
-
hf_repo_results=RESULTS_REPO,
|
| 40 |
-
local_dir_results=EVAL_RESULTS_PATH_BACKEND
|
| 41 |
-
)
|
| 42 |
|
| 43 |
# Get all eval request that are PENDING, if you want to run other evals, change this parameter
|
| 44 |
eval_requests = get_eval_requests(job_status=current_pending_status, hf_repo=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH_BACKEND)
|
|
@@ -53,6 +43,8 @@ def run_auto_eval():
|
|
| 53 |
eval_request = eval_requests[0]
|
| 54 |
pp.pprint(eval_request)
|
| 55 |
|
|
|
|
|
|
|
| 56 |
set_eval_request(
|
| 57 |
api=API,
|
| 58 |
eval_request=eval_request,
|
|
@@ -73,6 +65,18 @@ def run_auto_eval():
|
|
| 73 |
limit=LIMIT
|
| 74 |
)
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
|
| 77 |
if __name__ == "__main__":
|
| 78 |
run_auto_eval()
|
|
|
|
| 29 |
|
| 30 |
# pull the eval dataset from the hub and parse any eval requests
|
| 31 |
# check completed evals and set them to finished
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
# Get all eval request that are PENDING, if you want to run other evals, change this parameter
|
| 34 |
eval_requests = get_eval_requests(job_status=current_pending_status, hf_repo=QUEUE_REPO, local_dir=EVAL_REQUESTS_PATH_BACKEND)
|
|
|
|
| 43 |
eval_request = eval_requests[0]
|
| 44 |
pp.pprint(eval_request)
|
| 45 |
|
| 46 |
+
print("current status, ", current_pending_status)
|
| 47 |
+
print("setting status to running now")
|
| 48 |
set_eval_request(
|
| 49 |
api=API,
|
| 50 |
eval_request=eval_request,
|
|
|
|
| 65 |
limit=LIMIT
|
| 66 |
)
|
| 67 |
|
| 68 |
+
print("setting the status now..")
|
| 69 |
+
check_completed_evals(
|
| 70 |
+
api=API,
|
| 71 |
+
checked_status=RUNNING_STATUS,
|
| 72 |
+
completed_status=FINISHED_STATUS,
|
| 73 |
+
failed_status=FAILED_STATUS,
|
| 74 |
+
hf_repo=QUEUE_REPO,
|
| 75 |
+
local_dir=EVAL_REQUESTS_PATH_BACKEND,
|
| 76 |
+
hf_repo_results=RESULTS_REPO,
|
| 77 |
+
local_dir_results=EVAL_RESULTS_PATH_BACKEND
|
| 78 |
+
)
|
| 79 |
+
|
| 80 |
|
| 81 |
if __name__ == "__main__":
|
| 82 |
run_auto_eval()
|