Skip to content

Commit 8299351

Browse files
Yuefeng Zhoutensorflower-gardener
Yuefeng Zhou
authored andcommitted
Allow TF_CONFIG when remote_cluster is specified in distribute coordinator's utility for estimator.
PiperOrigin-RevId: 210666455
1 parent c010fec commit 8299351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow/python/distribute/estimator_training.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ def init_run_config(config, tf_config):
147147
# `experimental_distribute.remote_cluster` is set.
148148
if (config._train_distribute and config._experimental_distribute and
149149
config._experimental_distribute.remote_cluster):
150-
if tf_config:
151-
raise ValueError('Cannot set both TF_CONFIG environment variable and '
150+
if cluster_spec:
151+
raise ValueError('Cannot set both "cluster_spec" of TF_CONFIG and '
152152
'`experimental_distribute.remote_cluster`')
153153
config._distribute_coordinator_mode = dc.CoordinatorMode.STANDALONE_CLIENT
154154
config._cluster_spec = config._experimental_distribute.remote_cluster

0 commit comments

Comments
 (0)