Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
pminervini
commited on
Commit
•
4d089a8
1
Parent(s):
d7b202a
update
Browse files- backend-cli.py +12 -4
backend-cli.py
CHANGED
@@ -88,10 +88,18 @@ def request_to_result_name(request: EvalRequest) -> str:
|
|
88 |
|
89 |
|
90 |
def process_evaluation(task: Task, eval_request: EvalRequest) -> dict:
|
91 |
-
batch_size =
|
92 |
-
|
93 |
-
|
94 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
|
96 |
print('RESULTS', results)
|
97 |
|
|
|
88 |
|
89 |
|
90 |
def process_evaluation(task: Task, eval_request: EvalRequest) -> dict:
|
91 |
+
batch_size = "auto"
|
92 |
+
|
93 |
+
try:
|
94 |
+
results = run_evaluation(eval_request=eval_request, task_names=[task.benchmark], num_fewshot=task.num_fewshot,
|
95 |
+
batch_size=batch_size, device=DEVICE, use_cache=None, limit=LIMIT)
|
96 |
+
except RuntimeError as e:
|
97 |
+
if "No executable batch size found" in str(e):
|
98 |
+
batch_size = 1
|
99 |
+
results = run_evaluation(eval_request=eval_request, task_names=[task.benchmark], num_fewshot=task.num_fewshot,
|
100 |
+
batch_size=batch_size, device=DEVICE, use_cache=None, limit=LIMIT)
|
101 |
+
else:
|
102 |
+
raise
|
103 |
|
104 |
print('RESULTS', results)
|
105 |
|