Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
30cedf0c
Commit
30cedf0c
authored
Sep 18, 2023
by
baberabb
Browse files
type annotations 3.8 compatible
parent
f4c1b9d6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/minerva_math/utils.py
lm_eval/tasks/minerva_math/utils.py
+2
-2
No files found.
lm_eval/tasks/minerva_math/utils.py
View file @
30cedf0c
...
@@ -4,7 +4,7 @@ import sympy
...
@@ -4,7 +4,7 @@ import sympy
from
sympy.parsing.latex
import
parse_latex
from
sympy.parsing.latex
import
parse_latex
import
signal
import
signal
from
lm_eval.logger
import
eval_logger
from
lm_eval.logger
import
eval_logger
from
typing
import
Optional
from
typing
import
Optional
,
List
,
Dict
# taken from
# taken from
...
@@ -69,7 +69,7 @@ def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
...
@@ -69,7 +69,7 @@ def process_docs(dataset: datasets.Dataset) -> datasets.Dataset:
return
dataset
.
map
(
_process_doc
)
return
dataset
.
map
(
_process_doc
)
def
process_results
(
doc
:
dict
,
results
:
l
ist
[
str
])
->
d
ict
[
str
,
int
]:
def
process_results
(
doc
:
dict
,
results
:
L
ist
[
str
])
->
D
ict
[
str
,
int
]:
candidates
=
results
[
0
]
candidates
=
results
[
0
]
unnormalized_answer
=
get_unnormalized_answer
(
candidates
)
unnormalized_answer
=
get_unnormalized_answer
(
candidates
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment