Commit 6c816cb7 authored by Leo Gao's avatar Leo Gao
Browse files

write_out: fallover to training data if no validation

parent 31b2a5dd
......@@ -32,8 +32,9 @@ def main():
os.makedirs(args.output_base_path, exist_ok=True)
for task_name, task in task_dict.items():
if not task.has_validation_docs():
continue
docs = task.validation_docs()
docs = task.training_docs()
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):
f.write(EXAMPLE_DIVIDER.format(i=i))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment