Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b88da6e

Browse files
shizhiwTaylor Robie
authored and
Taylor Robie
committed
Use data_dir instead of flags.FLAGS.data_dir in data_preprocessing.py. (tensorflow#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.
1 parent 61b03fc commit b88da6e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

official/recommendation/data_preprocessing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,11 +470,11 @@ def instantiate_pipeline(dataset, data_dir, batch_size, eval_batch_size,
470470
}
471471
if ncf_dataset.deterministic:
472472
flags_["seed"] = stat_utils.random_int32()
473-
tf.gfile.MakeDirs(flags.FLAGS.data_dir)
473+
tf.gfile.MakeDirs(data_dir)
474474
# We write to a temp file then atomically rename it to the final file,
475475
# because writing directly to the final file can cause the data generation
476476
# async process to read a partially written JSON file.
477-
flagfile_temp = os.path.join(flags.FLAGS.data_dir, rconst.FLAGFILE_TEMP)
477+
flagfile_temp = os.path.join(data_dir, rconst.FLAGFILE_TEMP)
478478
tf.logging.info("Preparing flagfile for async data generation in {} ..."
479479
.format(flagfile_temp))
480480
with tf.gfile.Open(flagfile_temp, "w") as f:

0 commit comments

Comments
 (0)