aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-07-11 18:23:35 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-11 18:27:30 -0700
commitb66ecbe4ef1a8514fe432c1cf52528498d8afade (patch)
treea71060e511f6a9baf63aaa8bf3814694be91a7c7
parent272dee9d54b95efebc1a8f17aa8eff413dac0db5 (diff)
Add warning to Experiment so that users know to set environment=cloud if they have an
explicit cluster and master (i.e. give an indication that they intend to be running distributed). PiperOrigin-RevId: 161612632
-rw-r--r--tensorflow/contrib/learn/python/learn/experiment.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/contrib/learn/python/learn/experiment.py b/tensorflow/contrib/learn/python/learn/experiment.py
index 475f5beefd..3075d9355c 100644
--- a/tensorflow/contrib/learn/python/learn/experiment.py
+++ b/tensorflow/contrib/learn/python/learn/experiment.py
@@ -245,6 +245,11 @@ class Experiment(object):
# Otherwise, the servers will wait to connect to each other before starting
# to train. We might as well start as soon as we can.
config = self._estimator.config
+ if (config.cluster_spec and config.master and
+ config.environment == run_config.Environment.LOCAL):
+ logging.warn("ClusterSpec and master are provided, but environment is "
+ "set to 'local'. Set environment to 'cloud' if you intend "
+ "to use the distributed runtime.")
if (config.environment != run_config.Environment.LOCAL and
config.environment != run_config.Environment.GOOGLE and
config.cluster_spec and config.master):