Commit d4ac494f authored by Shawn Wang's avatar Shawn Wang
Browse files

Added option to use_subprocess or not in ncf_main.py.

parent a45cafb3
...@@ -144,7 +144,8 @@ def run_ncf(_): ...@@ -144,7 +144,8 @@ def run_ncf(_):
num_neg=FLAGS.num_neg, num_neg=FLAGS.num_neg,
epochs_per_cycle=FLAGS.epochs_between_evals, epochs_per_cycle=FLAGS.epochs_between_evals,
match_mlperf=FLAGS.ml_perf, match_mlperf=FLAGS.ml_perf,
deterministic=FLAGS.seed is not None) deterministic=FLAGS.seed is not None,
use_subprocess=FLAGS.use_subprocess)
model_helpers.apply_clean(flags.FLAGS) model_helpers.apply_clean(flags.FLAGS)
...@@ -369,6 +370,12 @@ def define_ncf_flags(): ...@@ -369,6 +370,12 @@ def define_ncf_flags():
return (eval_batch_size is None or return (eval_batch_size is None or
int(eval_batch_size) > rconst.NUM_EVAL_NEGATIVES) int(eval_batch_size) > rconst.NUM_EVAL_NEGATIVES)
flags.DEFINE_bool(
name="use_subprocess", default=True, help=flags_core.help_wrap(
"By default, ncf_main.py starts async data generation process as a "
"subprocess. If set to False, ncf_main.py will assume the async data "
"generation process has already been started by the user."))
if __name__ == "__main__": if __name__ == "__main__":
tf.logging.set_verbosity(tf.logging.INFO) tf.logging.set_verbosity(tf.logging.INFO)
......
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