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
ebbb6c00
Unverified
Commit
ebbb6c00
authored
Jun 21, 2023
by
Lintang Sutawika
Committed by
GitHub
Jun 21, 2023
Browse files
Update samplers.py
parent
b85545b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lm_eval/api/samplers.py
lm_eval/api/samplers.py
+3
-2
No files found.
lm_eval/api/samplers.py
View file @
ebbb6c00
...
...
@@ -7,7 +7,8 @@ class Sampler:
self
.
task
=
task
self
.
config
=
task
.
_config
self
.
delimiter
=
self
.
config
.
target_delimiter
self
.
target_delimiter
=
self
.
config
.
target_delimiter
self
.
fewshot_delimiter
=
self
.
config
.
fewshot_delimiter
self
.
docs
=
docs
# HF dataset split, provided by task._fewshot_docs()
if
fewshot_indices
:
# subset few-shot docs from
...
...
@@ -34,7 +35,7 @@ class Sampler:
[
# TODO: is separating doc_to_text and doc_to_target by one space always desired?
self
.
task
.
doc_to_text
(
doc
)
+
self
.
config
.
sample
_delimiter
+
self
.
fewshot
_delimiter
+
self
.
task
.
doc_to_target
(
doc
)
for
doc
in
selected_docs
]
...
...
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