Skip to content

Commit

Permalink
Remove chief!=0 or ps!=0 assertion in tensorflow (flyteorg#327)
Browse files Browse the repository at this point in the history
Signed-off-by: byhsu <[email protected]>
Co-authored-by: byhsu <[email protected]>
  • Loading branch information
ByronHsu and ByronHsu authored Mar 6, 2023
1 parent 114645a commit be833e2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
3 changes: 0 additions & 3 deletions go/tasks/plugins/k8s/kfoperators/tensorflow/tensorflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ func (tensorflowOperatorResourceHandler) BuildResource(ctx context.Context, task
if workers == 0 {
return nil, fmt.Errorf("number of worker should be more then 0")
}
if psReplicas == 0 && chiefReplicas == 0 {
return nil, fmt.Errorf("either number of chief or parameter servers needs to be be more then 0")
}

jobSpec := kubeflowv1.TFJobSpec{
TFReplicaSpecs: map[commonOp.ReplicaType]*commonOp.ReplicaSpec{},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,6 @@ func TestReplicaCounts(t *testing.T) {
notContains []commonOp.ReplicaType
}{
{"NoWorkers", 1, 1, 0, true, nil, nil},
{"NoChiefOrPS", 0, 0, 1, true, nil, nil},
{"SingleChief", 1, 0, 1, false,
[]commonOp.ReplicaType{kubeflowv1.TFJobReplicaTypeChief, kubeflowv1.TFJobReplicaTypeWorker},
[]commonOp.ReplicaType{kubeflowv1.TFJobReplicaTypePS}},
Expand Down

0 comments on commit be833e2

Please sign in to comment.