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
a1ef56aa
Unverified
Commit
a1ef56aa
authored
Nov 29, 2020
by
Leo Gao
Committed by
GitHub
Nov 29, 2020
Browse files
Allow num_examples to fetch all if num_examples < 0
parent
15c87e9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
write_out.py
write_out.py
+1
-1
No files found.
write_out.py
View file @
a1ef56aa
...
...
@@ -36,7 +36,7 @@ def main():
else
:
docs
=
task
.
validation_docs
()
with
open
(
os
.
path
.
join
(
args
.
output_base_path
,
task_name
),
"w"
)
as
f
:
for
i
,
doc
in
zip
(
range
(
args
.
num_examples
),
docs
):
for
i
,
doc
in
zip
(
range
(
args
.
num_examples
),
docs
)
if
args
.
num_examples
>
0
else
enumerate
(
docs
)
:
f
.
write
(
EXAMPLE_DIVIDER
.
format
(
i
=
i
))
ctx
=
task
.
fewshot_context
(
doc
=
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