Commit 1f63b3dc authored by Baber's avatar Baber
Browse files

fix

parent 6bc8b8cc
......@@ -7,10 +7,10 @@ doc_to_text: "Solve the following math problem efficiently and clearly:\n\n- For
#process_results: !function utils.process_results
doc_to_target: "{{answer if few_shot is undefined else solution}}"
process_results: !function utils.process_results
repeats: 2
repeats: 64
generation_kwargs:
until: []
max_gen_toks: 1024
max_gen_toks: 32768
do_sample: true
top_p: 0.95
temperature: 0.6
......
......@@ -78,7 +78,7 @@ def process_results(docs: dict, resps: list[dict]) -> dict:
return resps[0]
# calculate pass@1 for all results
def get_metric(predictions: list[list[str]], references: list[dict]) -> Dict[str, int]:
def get_metric(predictions: list[list[str]], references: list[dict]) -> list[dict]:
res = []
for reference, candidates in zip(references, predictions):
for candidate in candidates:
......@@ -89,12 +89,12 @@ def get_metric(predictions: list[list[str]], references: list[dict]) -> Dict[str
retval = 1
results = {
"accuracy": retval,
"acc": retval,
}
res.append(results)
break
else:
res.append({"accuracy": 0})
res.append({"acc": 0})
return res
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment