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

write_out: fallover to training data if no validation

parent 31b2a5dd
...@@ -32,7 +32,8 @@ def main(): ...@@ -32,7 +32,8 @@ 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()
else:
docs = task.validation_docs() 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):
......
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