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
5a7ed3ee
Unverified
Commit
5a7ed3ee
authored
Jul 08, 2024
by
Choyunhui
Committed by
GitHub
Jul 08, 2024
Browse files
Fix TypeError in samplers.py by converting int to str (#2074)
Co-authored-by:
yhjo
<
yhjo@suresofttech.com
>
parent
d855d0ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
lm_eval/api/samplers.py
lm_eval/api/samplers.py
+1
-1
No files found.
lm_eval/api/samplers.py
View file @
5a7ed3ee
...
@@ -55,7 +55,7 @@ class ContextSampler:
...
@@ -55,7 +55,7 @@ class ContextSampler:
labeled_examples
+=
(
labeled_examples
+=
(
str
(
doc_target
[
0
])
str
(
doc_target
[
0
])
if
isinstance
(
doc_target
,
list
)
if
isinstance
(
doc_target
,
list
)
else
doc_target
else
str
(
doc_target
)
if
self
.
config
.
doc_to_choice
is
None
or
isinstance
(
doc_target
,
str
)
if
self
.
config
.
doc_to_choice
is
None
or
isinstance
(
doc_target
,
str
)
else
str
(
self
.
doc_to_choice
(
doc
)[
doc_target
])
else
str
(
self
.
doc_to_choice
(
doc
)[
doc_target
])
)
)
...
...
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