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
82d57f65
Commit
82d57f65
authored
Jul 13, 2023
by
lintangsutawika
Browse files
process condition for doc_to_text
parent
e9432fad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
lm_eval/api/samplers.py
lm_eval/api/samplers.py
+8
-1
No files found.
lm_eval/api/samplers.py
View file @
82d57f65
...
...
@@ -38,7 +38,14 @@ class Sampler:
self
.
fewshot_delimiter
.
join
(
[
# TODO: is separating doc_to_text and doc_to_target by one space always desired?
self
.
doc_to_text
(
doc
)
(
self
.
doc_to_text
(
doc
)
if
(
self
.
config
.
doc_to_choice
is
None
or
type
(
self
.
doc_to_text
(
doc
))
is
str
)
else
self
.
doc_to_choice
(
doc
)[
self
.
doc_to_text
(
doc
)]
)
+
self
.
target_delimiter
+
(
self
.
doc_to_target
(
doc
)
...
...
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