提交 b88da6ee 编写于 作者: S shizhiw 提交者: Taylor Robie

Use data_dir instead of flags.FLAGS.data_dir in data_preprocessing.py. (#5506)

* Use data_dir instead of flags.FLAGS.data_dir in data_preprocessing.py.

* Use data_dir instead of flags.FLAGS.data_dir in data_preprocessing.py.
上级 61b03fcf
......@@ -470,11 +470,11 @@ def instantiate_pipeline(dataset, data_dir, batch_size, eval_batch_size,
}
if ncf_dataset.deterministic:
flags_["seed"] = stat_utils.random_int32()
tf.gfile.MakeDirs(flags.FLAGS.data_dir)
tf.gfile.MakeDirs(data_dir)
# We write to a temp file then atomically rename it to the final file,
# because writing directly to the final file can cause the data generation
# async process to read a partially written JSON file.
flagfile_temp = os.path.join(flags.FLAGS.data_dir, rconst.FLAGFILE_TEMP)
flagfile_temp = os.path.join(data_dir, rconst.FLAGFILE_TEMP)
tf.logging.info("Preparing flagfile for async data generation in {} ..."
.format(flagfile_temp))
with tf.gfile.Open(flagfile_temp, "w") as f:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册