Roll back create_cluster_spec change in estimator until nightly picks up the updated tf.

PiperOrigin-RevId: 253917889
This commit is contained in:
Rick Chao 2019-06-18 19:37:32 -07:00 committed by TensorFlower Gardener
parent ee21809f1b
commit 1fef4919bb

View File

@ -183,11 +183,11 @@ def create_in_process_cluster(num_workers,
protocol='grpc') protocol='grpc')
def create_cluster_spec(test_obj, def create_cluster_spec(has_chief=False,
has_chief=False,
num_workers=1, num_workers=1,
num_ps=0, num_ps=0,
has_eval=False): has_eval=False,
test_obj=None):
"""Create a cluster spec with tasks with unused local ports.""" """Create a cluster spec with tasks with unused local ports."""
if _portpicker_import_error: if _portpicker_import_error:
raise _portpicker_import_error # pylint: disable=raising-bad-type raise _portpicker_import_error # pylint: disable=raising-bad-type
@ -207,6 +207,8 @@ def create_cluster_spec(test_obj,
if has_eval: if has_eval:
cluster_spec['evaluator'] = ['localhost:%s' % pick_unused_port()] cluster_spec['evaluator'] = ['localhost:%s' % pick_unused_port()]
except portpicker.NoFreePortFoundError: except portpicker.NoFreePortFoundError:
if test_obj is None:
raise
test_obj.skipTest('Flakes in portpicker library do not represent ' test_obj.skipTest('Flakes in portpicker library do not represent '
'TensorFlow errors.') 'TensorFlow errors.')
return cluster_spec return cluster_spec