"git@developer.sourcefind.cn:gaoqiong/composable_kernel.git" did not exist on "0d6aa311e944172dbe1bc636e74b858e8b2ed450"
Unverified Commit ce1a8cd0 authored by Hailey Schoelkopf's avatar Hailey Schoelkopf Committed by GitHub
Browse files

Merge pull request #856 from chrisociepa/bugfix-write_out

Fix "local variable 'docs' referenced before assignment" error in write_out.py
parents fa8f2381 0ed5527a
...@@ -38,13 +38,15 @@ def main(): ...@@ -38,13 +38,15 @@ def main():
iters = [] iters = []
for set in args.sets.split(","): for set in args.sets.split(","):
docs = None
if set == "train" and task.has_training_docs(): if set == "train" and task.has_training_docs():
docs = task.training_docs() docs = task.training_docs()
if set == "val" and task.has_validation_docs(): if set == "val" and task.has_validation_docs():
docs = task.validation_docs() docs = task.validation_docs()
if set == "test" and task.has_test_docs(): if set == "test" and task.has_test_docs():
docs = task.test_docs() docs = task.test_docs()
iters.append(docs) if docs is not None:
iters.append(docs)
docs = join_iters(iters) docs = join_iters(iters)
......
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