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
a09cc41f
Commit
a09cc41f
authored
Jan 13, 2023
by
Albert Jiang
Browse files
remove an unnecessary print
parent
32612dc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lm_eval/tasks/hendrycks_math.py
lm_eval/tasks/hendrycks_math.py
+2
-2
No files found.
lm_eval/tasks/hendrycks_math.py
View file @
a09cc41f
...
@@ -67,7 +67,7 @@ class Math(Task):
...
@@ -67,7 +67,7 @@ class Math(Task):
def
parse_description
(
self
,
description
):
def
parse_description
(
self
,
description
):
"""description is a string with comma-separated key=value tuples
"""description is a string with comma-separated key=value tuples
e.g.:
e.g.:
"majority_voting=32,sampling_temperature=
1.0
"
"majority_voting=32,sampling_temperature=
0.3
"
"""
"""
parsed_dict
=
{}
parsed_dict
=
{}
for
term
in
description
.
split
(
","
):
for
term
in
description
.
split
(
","
):
...
@@ -125,7 +125,7 @@ class Math(Task):
...
@@ -125,7 +125,7 @@ class Math(Task):
answer
=
self
.
majority_vote
(
results
[
0
])
answer
=
self
.
majority_vote
(
results
[
0
])
else
:
else
:
raise
AssertionError
raise
AssertionError
print
(
answer
)
if
self
.
is_equiv
(
if
self
.
is_equiv
(
answer
,
self
.
remove_boxed
(
self
.
last_boxed_only_string
(
doc
[
"solution"
]))
answer
,
self
.
remove_boxed
(
self
.
last_boxed_only_string
(
doc
[
"solution"
]))
):
):
...
...
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