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

Skip to content

Fix/ncf mlperf tweaks #5334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Sep 20, 2018
Merged

Fix/ncf mlperf tweaks #5334

merged 9 commits into from
Sep 20, 2018

Conversation

robieta
Copy link
Contributor

@robieta robieta commented Sep 19, 2018

  • Cleanup run script. Fix hr threshold and add ml_perf flag
  • Make exit behavior more stable
  • Add seed to reduce variation. There is still unaccounted for variation, but this at least removes some of it.

@robieta robieta requested review from karmel and a team as code owners September 19, 2018 17:14
@robieta robieta requested review from reedwm and removed request for karmel September 19, 2018 17:14
atexit.register(_shutdown, proc=proc)
atexit.register(tf.gfile.DeleteRecursively,
ncf_dataset.cache_paths.cache_root)
cleanup_called = {"finished": False}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do you set this to True?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Good catch.

@@ -390,6 +396,8 @@ def run_ncf(_):
if model_helpers.past_stop_threshold(FLAGS.hr_threshold, hr):
break

cleanup_fn() # Cleanup data construction artifacts and subprocess.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to call this, since it's registered with atexit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comes from Shawn. He is running in a loop, and is accumulating files because the atexit hasn't triggered yet. I neglected that use case when I decided to rely on atexits.

num_gpus = flags_core.get_num_gpus(FLAGS)
batch_size = distribution_utils.per_device_batch_size(
int(FLAGS.batch_size), num_gpus)
eval_batch_size = int(FLAGS.eval_batch_size or FLAGS.batch_size)
ncf_dataset = data_preprocessing.instantiate_pipeline(
ncf_dataset, cleanup_fn = data_preprocessing.instantiate_pipeline(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass deterministic=FLAGS.seed is not None

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. I wonder if this is the reason that I wasn't seeing deterministic behavior. (I'll rerun to test.)

@robieta robieta force-pushed the fix/ncf_mlperf_tweaks branch from 1b180ca to 11c5a43 Compare September 19, 2018 21:20
@robieta robieta merged commit 4dc1080 into master Sep 20, 2018
@robieta robieta deleted the fix/ncf_mlperf_tweaks branch September 20, 2018 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants