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
6c816cb7
"vscode:/vscode.git/clone" did not exist on "b3e8d57d51300b88b591900621f71b6a1b3a7acc"
Commit
6c816cb7
authored
Oct 05, 2020
by
Leo Gao
Browse files
write_out: fallover to training data if no validation
parent
31b2a5dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
write_out.py
write_out.py
+3
-2
No files found.
write_out.py
View file @
6c816cb7
...
@@ -32,8 +32,9 @@ def main():
...
@@ -32,8 +32,9 @@ def main():
os
.
makedirs
(
args
.
output_base_path
,
exist_ok
=
True
)
os
.
makedirs
(
args
.
output_base_path
,
exist_ok
=
True
)
for
task_name
,
task
in
task_dict
.
items
():
for
task_name
,
task
in
task_dict
.
items
():
if
not
task
.
has_validation_docs
():
if
not
task
.
has_validation_docs
():
continue
docs
=
task
.
training_docs
()
docs
=
task
.
validation_docs
()
else
:
docs
=
task
.
validation_docs
()
with
open
(
os
.
path
.
join
(
args
.
output_base_path
,
task_name
),
"w"
)
as
f
:
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
):
f
.
write
(
EXAMPLE_DIVIDER
.
format
(
i
=
i
))
f
.
write
(
EXAMPLE_DIVIDER
.
format
(
i
=
i
))
...
...
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