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
6ffc9d5a
Commit
6ffc9d5a
authored
Jun 19, 2024
by
Hojin Lee
Browse files
fix type casting of references
parent
f948e989
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/api/task.py
lm_eval/api/task.py
+1
-1
No files found.
lm_eval/api/task.py
View file @
6ffc9d5a
...
@@ -1445,7 +1445,7 @@ class ConfigurableTask(Task):
...
@@ -1445,7 +1445,7 @@ class ConfigurableTask(Task):
# we expect multiple_targets to be a list.
# we expect multiple_targets to be a list.
elif
self
.
multiple_target
:
elif
self
.
multiple_target
:
gold
=
list
(
gold
)
gold
=
list
(
gold
)
elif
type
(
gold
)
!=
type
(
result
):
elif
type
(
gold
)
!=
type
(
result
)
and
not
isinstance
(
result
,
List
)
:
# cast gold to the same type as result
# cast gold to the same type as result
gold
=
type
(
result
)(
gold
)
gold
=
type
(
result
)(
gold
)
...
...
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