Skip to content

Commit

Permalink
Update pkg/webhooks/pytorch/pytorchjob_webhook.go
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Velichkevich <[email protected]>
Signed-off-by: Tara Tufano <[email protected]>
  • Loading branch information
tarat44 and andreyvelich authored Dec 4, 2024
1 parent a4a0050 commit b985152
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/webhooks/pytorch/pytorchjob_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func validateSpec(spec trainingoperator.PyTorchJobSpec) (admission.Warnings, fie
allErrs = append(allErrs, field.Required(workerPath, "must be configured if elastic policy is used"))
} else if workerReplicaSpec.Replicas != nil && int(*workerReplicaSpec.Replicas) < 1 {
workerReplicasPath := workerPath.Child("replicas")
allErrs = append(allErrs, field.Forbidden(workerReplicasPath, "must be at least 1 if elastic policy is used"))
allErrs = append(allErrs, field.Forbidden(workerReplicasPath, "must be at least 1 worker if elastic policy is used"))
}
if spec.ElasticPolicy.NProcPerNode != nil {
elasticNProcPerNodePath := specPath.Child("elasticPolicy").Child("nProcPerNode")
Expand Down

0 comments on commit b985152

Please sign in to comment.