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

bugfix: TF_CONFIG error when enable evaluator #2

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions pkg/controller.v1/tensorflow/tensorflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func genTFConfigJSONStr(tfjob *tfv1.TFJob, rtype, index string) (string, error)
tfConfig := TFConfig{
Cluster: cluster,
Task: TaskSpec{
Type: rtype,
Type: strings.ToLower(rtype),
Index: int(i),
},
// We need to set environment to cloud otherwise it will default to local which isn't what we want.
Expand All @@ -107,11 +107,13 @@ func genClusterSpec(tfjob *tfv1.TFJob) (ClusterSpec, error) {
clusterSpec := make(ClusterSpec)

for rtype, spec := range tfjob.Spec.TFReplicaSpecs {
if rtype == tfv1.TFReplicaTypeEval {
// https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig
// evaluator is not part of training cluster
continue
}
// fix issue https://github.com/kubeflow/training-operator/issues/1139
// NOTE: may incompatible with tf version <= 1.12
//if rtype == tfv1.TFReplicaTypeEval {
// // https://www.tensorflow.org/api_docs/python/tf/estimator/RunConfig
// // evaluator is not part of training cluster
// continue
//}
rt := strings.ToLower(string(rtype))
replicaNames := make([]string, 0, *spec.Replicas)

Expand Down