Skip to content

Commit 427afbd

Browse files
refactor: Remove RHAI preStop hook injection from JobSet plugin
1 parent e9add5e commit 427afbd

File tree

1 file changed

+0
-16
lines changed
  • pkg/runtime/framework/plugins/jobset

1 file changed

+0
-16
lines changed

pkg/runtime/framework/plugins/jobset/jobset.go

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import (
4444
trainer "github.com/kubeflow/trainer/v2/pkg/apis/trainer/v1alpha1"
4545
"github.com/kubeflow/trainer/v2/pkg/apply"
4646
"github.com/kubeflow/trainer/v2/pkg/constants"
47-
"github.com/kubeflow/trainer/v2/pkg/rhai/progression"
4847
"github.com/kubeflow/trainer/v2/pkg/runtime"
4948
"github.com/kubeflow/trainer/v2/pkg/runtime/framework"
5049
)
@@ -279,21 +278,6 @@ func (j *JobSet) Build(ctx context.Context, info *runtime.Info, trainJob *traine
279278
container.VolumeMounts...,
280279
)
281280
}
282-
283-
// RHAI-specific: Inject preStop hook for progression tracking on trainer pods
284-
// Note: This uses pkg/rhai/progression to keep RHAI logic centralized
285-
if ps.Ancestor != nil && *ps.Ancestor == constants.AncestorTrainer {
286-
if err := progression.InjectPreStopHookToApplyConfig(
287-
jobSetSpec.ReplicatedJobs[psIdx].Template.Spec.Template.Spec,
288-
trainJob,
289-
); err != nil {
290-
log := ctrl.LoggerFrom(ctx)
291-
log.Error(err, "Failed to inject preStop hook for progression tracking",
292-
"trainJob", trainJob.Name,
293-
"namespace", trainJob.Namespace)
294-
// Don't fail pod creation, progression tracking is optional
295-
}
296-
}
297281
}
298282

299283
// Init the JobSet apply configuration from the runtime template spec

0 commit comments

Comments
 (0)