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
b07ecab4
Commit
b07ecab4
authored
Feb 12, 2021
by
Anthony DiPofi
Browse files
small change to regex
parent
81e42932
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/tasks/mathqa.py
lm_eval/tasks/mathqa.py
+1
-1
No files found.
lm_eval/tasks/mathqa.py
View file @
b07ecab4
...
...
@@ -18,7 +18,7 @@ class MathQA(HFTask, MultipleChoiceTask):
def
_convert_standard
(
self
,
doc
):
answer_idx
=
[
'a'
,
'b'
,
'c'
,
'd'
,
'e'
].
index
(
doc
[
'correct'
])
choices
=
[
c
[
4
:].
rstrip
(
" ,"
)
for
c
in
re
.
findall
(
r
"[abcd] \) .*?, |e .*?$"
,
doc
[
'options'
])]
choices
=
[
c
[
4
:].
rstrip
(
" ,"
)
for
c
in
re
.
findall
(
r
"[abcd] \) .*?, |e
\)
.*?$"
,
doc
[
'options'
])]
out_doc
=
{
"query"
:
"Question: "
+
doc
[
'Problem'
]
+
"
\n
Answer:"
,
...
...
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