diff --git a/pkg/runtime.v2/core/trainingruntime.go b/pkg/runtime.v2/core/trainingruntime.go index ff53063924..8cd21a8cf3 100644 --- a/pkg/runtime.v2/core/trainingruntime.go +++ b/pkg/runtime.v2/core/trainingruntime.go @@ -114,8 +114,7 @@ func (r *TrainingRuntime) buildObjects( return nil, err } - err := r.framework.RunEnforcePodGroupPolicyPlugins(info, trainJob, podGroupPolicy) - if err != nil { + if err := r.framework.RunEnforcePodGroupPolicyPlugins(info, trainJob, podGroupPolicy); err != nil { return nil, err }