adding ps_strategy to run_config to enable different placement strate… (#15640)
authorSiu Kei, Muk <muksiukei@gmail.com>
Mon, 16 Apr 2018 02:23:20 +0000 (10:23 +0800)
committerJonathan Hseu <vomjom@vomjom.net>
Mon, 16 Apr 2018 02:23:20 +0000 (19:23 -0700)
commitc6fdeaca7dd32c6bec3ff2df14889c3f2c129f14
treee36a2f95f1919b241466f1ea4f3021859e952466
parentba1c53a5f2bb106e16ec7503dbd4d0db9ecc9799
adding ps_strategy to run_config to enable different placement strate… (#15640)

* adding ps_strategy to run_config to enable different placement strategy in estimator

* 1. Moved estimator._device_fn to RunConfig as @property
2. Made RunConfig.device_fn to return custom device function if one is specified, otherwise the result from `tf.train.replica_device_setter` call is used
3. Added some basic unit tests, may need further tests.

* 1. Removing ps_strategy.
2. Modified estimator to take overriden device_fn from  if set.
3. Removed ps_strategy related unit tests.

* Adding manual initialization of _device_fn in legacy RunConfig class

* Updated estimator golden API through
1. bazel build //tensorflow/tools/api/tests:api_compatibility_test
2. bazel-bin/tensorflow/tools/api/tests/api_compatibility_test --update_goldens True

* fixing code styles
tensorflow/contrib/learn/python/learn/estimators/run_config.py
tensorflow/python/estimator/estimator.py
tensorflow/python/estimator/run_config.py
tensorflow/python/estimator/run_config_test.py
tensorflow/tools/api/golden/tensorflow.estimator.-run-config.pbtxt