Skip to content
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

[v1alpha2] Estimator support - Do not include evaluator in cluster spec #650

Merged
merged 2 commits into from
Jun 13, 2018

Conversation

xychu
Copy link
Contributor

@xychu xychu commented Jun 13, 2018

When using Estimator and tf.estimator.train_and_evaluate for distributed task,
the evaluator should not be included in the cluster spec.

Example of evaluator node (evaluator is not part of training cluster):

  cluster = {'chief': ['host0:2222'],
             'ps': ['host1:2222', 'host2:2222'],
             'worker': ['host3:2222', 'host4:2222', 'host5:2222']}
  os.environ['TF_CONFIG'] = json.dumps(
      {'cluster': cluster,
       'task': {'type': 'evaluator', 'index': 0}})
  config = RunConfig()
  assert config.master == ''
  assert config.evaluator_master == ''
  assert config.task_id == 0
  assert config.num_ps_replicas == 0
  assert config.num_worker_replicas == 0
  assert config.cluster_spec == {}
  assert config.task_type == 'evaluator'
  assert not config.is_chief

Refs:
https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig
https://www.tensorflow.org/api_docs/python/tf/estimator/train_and_evaluate


This change is Reviewable

@gaocegege
Copy link
Member

Thanks for your contribution!

/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gaocegege

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coveralls
Copy link

coveralls commented Jun 13, 2018

Coverage Status

Coverage decreased (-0.05%) to 54.339% when pulling 7d1d084 on xychu:estimator_support into ee1709f on kubeflow:master.

@k8s-ci-robot k8s-ci-robot merged commit 2456e44 into kubeflow:master Jun 13, 2018
yph152 pushed a commit to yph152/tf-operator that referenced this pull request Jun 18, 2018
…spec (kubeflow#650)

* Do not include evaluator in cluster spec

* Update developer guide for v1alpha2
jetmuffin pushed a commit to jetmuffin/tf-operator that referenced this pull request Jul 9, 2018
…spec (kubeflow#650)

* Do not include evaluator in cluster spec

* Update developer guide for v1alpha2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants