Skip to content

Commit f8255b7

Browse files
authored
Corrected Some Spelling And Grammatical Errors (#1980)
Signed-off-by: Daniel Hu <[email protected]>
1 parent 3d74a58 commit f8255b7

File tree

6 files changed

+12
-14
lines changed

6 files changed

+12
-14
lines changed

cmd/training-operator.v1/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ import (
4747
)
4848

4949
const (
50-
// EnvKubeflowNamespace is a environment variable for namespace when deployed on kubernetes
50+
// EnvKubeflowNamespace is an environment variable for namespace when deployed on kubernetes
5151
EnvKubeflowNamespace = "KUBEFLOW_NAMESPACE"
5252
)
5353

pkg/controller.v1/common/job.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,14 @@ func (jc *JobController) ReconcileJobs(
120120

121121
oldStatus := jobStatus.DeepCopy()
122122
if commonutil.IsFinished(jobStatus) {
123-
// If the Job is succeed or failed, delete all pods, services, and podGroup.
123+
// If the Job is succeeded or failed, delete all pods, services, and podGroup.
124124
if err = jc.CleanUpResources(runPolicy, runtimeObject, metaObject, jobStatus, pods); err != nil {
125125
return err
126126
}
127127

128128
// At this point the pods may have been deleted.
129129
// 1) If the job succeeded, we manually set the replica status.
130-
// 2) If any replicas are still active, set their status to succeeded.
130+
// 2) If any replicas are still active, set their status to 'succeeded'.
131131
if commonutil.IsSucceeded(jobStatus) {
132132
for rtype := range jobStatus.ReplicaStatuses {
133133
jobStatus.ReplicaStatuses[rtype].Succeeded += jobStatus.ReplicaStatuses[rtype].Active
@@ -192,7 +192,7 @@ func (jc *JobController) ReconcileJobs(
192192
if runPolicy.BackoffLimit != nil {
193193
jobHasNewFailure := failed > prevReplicasFailedNum
194194
// new failures happen when status does not reflect the failures and active
195-
// is different than parallelism, otherwise the previous controller loop
195+
// is different from parallelism, otherwise the previous controller loop
196196
// failed updating status so even if we pick up failure it is not a new one
197197
exceedsBackoffLimit = jobHasNewFailure && (active != totalReplicas) &&
198198
(int32(previousRetry)+1 > *runPolicy.BackoffLimit)

pkg/controller.v1/common/pod.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ import (
4444
const (
4545
// podTemplateRestartPolicyReason is the warning reason when the restart
4646
// policy is set in pod template.
47-
podTemplateRestartPolicyReason = "SettedPodTemplateRestartPolicy"
47+
podTemplateRestartPolicyReason = "SetPodTemplateRestartPolicy"
4848
// exitedWithCodeReason is the normal reason when the pod is exited because of the exit code.
4949
exitedWithCodeReason = "ExitedWithCode"
5050
// podTemplateSchedulerNameReason is the warning reason when other scheduler name is set
5151
// in pod templates with gang-scheduling enabled
52-
podTemplateSchedulerNameReason = "SettedPodTemplateSchedulerName"
52+
podTemplateSchedulerNameReason = "SetPodTemplateSchedulerName"
5353
)
5454

5555
var (
@@ -167,7 +167,7 @@ func (jc *JobController) DeletePod(obj interface{}) {
167167

168168
logger := commonutil.LoggerForPod(pod, jc.Controller.GetAPIGroupVersionKind().Kind)
169169

170-
// When a delete is dropped, the relist will notice a pod in the store not
170+
// When delete is dropped, the relist will notice a pod in the store not
171171
// in the list, leading to the insertion of a tombstone object which contains
172172
// the deleted key/value. Note that this value might be stale. If the pod
173173
// changed labels the new job will not be woken up till the periodic resync.

pkg/controller.v1/common/service.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
14+
1415
package common
1516

1617
import (
@@ -99,7 +100,7 @@ func (jc *JobController) DeleteService(obj interface{}) {
99100
// TODO(CPH): handle this gracefully.
100101
}
101102

102-
// getServicesForJob returns the set of services that this job should manage.
103+
// GetServicesForJob returns the set of services that this job should manage.
103104
// It also reconciles ControllerRef by adopting/orphaning.
104105
// Note that the returned services are pointers into the cache.
105106
func (jc *JobController) GetServicesForJob(jobObject interface{}) ([]*v1.Service, error) {
@@ -151,7 +152,7 @@ func (jc *JobController) GetServiceSlices(services []*v1.Service, replicas int,
151152
return core.GetServiceSlices(services, replicas, logger)
152153
}
153154

154-
// reconcileServices checks and updates services for each given ReplicaSpec.
155+
// ReconcileServices checks and updates services for each given ReplicaSpec.
155156
// It will requeue the job in case of an error while creating/deleting services.
156157
func (jc *JobController) ReconcileServices(
157158
job metav1.Object,

pkg/controller.v1/pytorch/elastic.go

-3
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ const (
4646
EnvMonitorInterval = "PET_MONITOR_INTERVAL"
4747
// EnvStartMethod is the environment variable name for the multiprocessing start method to use when creating workers, which could be fork, spawn and forkserver.
4848
EnvStartMethod = "PET_START_METHOD"
49-
50-
// EnvNNodes is the common environment variable name from envvar
51-
5249
// EnvNProcPerNode is the environment variable name for the number of processes per node.
5350
EnvNProcPerNode = "PET_NPROC_PER_NODE"
5451
)

pkg/controller.v1/pytorch/pytorchjob_controller.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -337,9 +337,9 @@ func (r *PyTorchJobReconciler) DeleteJob(job interface{}) error {
337337
return nil
338338
}
339339

340-
func (jc *PyTorchJobReconciler) GenLabelSelector(jobName string,
340+
func (r *PyTorchJobReconciler) GenLabelSelector(jobName string,
341341
rtype kubeflowv1.ReplicaType) *metav1.LabelSelector {
342-
labels := jc.GenLabels(jobName)
342+
labels := r.GenLabels(jobName)
343343
labels[kubeflowv1.ReplicaTypeLabel] = strings.ToLower(string(rtype))
344344

345345
return &metav1.LabelSelector{

0 commit comments

Comments
 (0)