Skip to content

Commit

Permalink
PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Jeev B <[email protected]>
  • Loading branch information
jeevb committed Nov 23, 2023
1 parent ca1a839 commit 1d29e02
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ func (mpiOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx plu
}

if *workerReplicaSpec.Replicas <= 0 {
return nil, fmt.Errorf("number of worker should be more then 0")
return nil, fmt.Errorf("number of workers must be greater than 0")
}
if *launcherReplicaSpec.Replicas <= 0 {
return nil, fmt.Errorf("number of launch worker should be more then 0")
return nil, fmt.Errorf("number of launchers must be greater than 0")

Check warning on line 132 in flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go

View check run for this annotation

Codecov / codecov/patch

flyteplugins/go/tasks/plugins/k8s/kfoperators/mpi/mpi.go#L132

Added line #L132 was not covered by tests
}

jobSpec := kubeflowv1.MPIJobSpec{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (pytorchOperatorResourceHandler) BuildResource(ctx context.Context, taskCtx
}

if *workerReplicaSpec.Replicas <= 0 {
return nil, fmt.Errorf("number of worker should be more then 0")
return nil, fmt.Errorf("number of workers must be greater than 0")
}

jobSpec := kubeflowv1.PyTorchJobSpec{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (tensorflowOperatorResourceHandler) BuildResource(ctx context.Context, task
}

if v, ok := replicaSpecMap[kubeflowv1.TFJobReplicaTypeWorker]; !ok || *v.Replicas <= 0 {
return nil, fmt.Errorf("number of worker should be more then 0")
return nil, fmt.Errorf("number of workers must be greater than 0")
}

jobSpec := kubeflowv1.TFJobSpec{
Expand Down

0 comments on commit 1d29e02

Please sign in to comment.