meg-huggingface
commited on
Commit
·
bb6f5b0
1
Parent(s):
ffe4d51
Including RUNNING requests as a file that can be FAILED.
Browse files
src/backend/manage_requests.py
CHANGED
|
@@ -97,7 +97,7 @@ def get_eval_requests(local_dir: str, hf_repo: str) -> list[EvalRequest]:
|
|
| 97 |
for json_filepath in json_files:
|
| 98 |
with open(json_filepath) as fp:
|
| 99 |
data = json.load(fp)
|
| 100 |
-
if data["status"]
|
| 101 |
data["json_filepath"] = json_filepath
|
| 102 |
eval_request = EvalRequest(**data)
|
| 103 |
eval_requests.append(eval_request)
|
|
@@ -149,9 +149,9 @@ def check_completed_evals(
|
|
| 149 |
local_dir=local_dir_results, repo_type="dataset",
|
| 150 |
max_workers=60, token=TOKEN)
|
| 151 |
|
| 152 |
-
|
| 153 |
|
| 154 |
-
for eval_request in
|
| 155 |
model = eval_request.model
|
| 156 |
logger.info("====================================")
|
| 157 |
logger.info(f"Checking {model}")
|
|
|
|
| 97 |
for json_filepath in json_files:
|
| 98 |
with open(json_filepath) as fp:
|
| 99 |
data = json.load(fp)
|
| 100 |
+
if data["status"] in [PENDING_STATUS, RUNNING_STATUS]:
|
| 101 |
data["json_filepath"] = json_filepath
|
| 102 |
eval_request = EvalRequest(**data)
|
| 103 |
eval_requests.append(eval_request)
|
|
|
|
| 149 |
local_dir=local_dir_results, repo_type="dataset",
|
| 150 |
max_workers=60, token=TOKEN)
|
| 151 |
|
| 152 |
+
eval_requests = get_eval_requests(hf_repo=hf_repo, local_dir=local_dir)
|
| 153 |
|
| 154 |
+
for eval_request in eval_requests:
|
| 155 |
model = eval_request.model
|
| 156 |
logger.info("====================================")
|
| 157 |
logger.info(f"Checking {model}")
|