Skip to content

Commit

Permalink
fix panic (#5388)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul authored Aug 5, 2024
1 parent 96be6fc commit 92ab0cc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions runtime/reconcilers/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,13 @@ func (r *ModelReconciler) acquireExecutor(ctx context.Context, self *runtimev1.R
return nil, nil, err
}

// Acquire the final result manager
finalResultManager, ok := finalOpts.OutputHandle.AsModelManager(r.C.InstanceID)
if !ok {
finalRelease()
return nil, nil, fmt.Errorf("output connector %q is not capable of managing model results", mdl.Spec.OutputConnector)
}

// Wrap the executors
wrapped := &wrappedModelExecutor{
finalConnector: finalConnector,
Expand All @@ -1229,6 +1236,7 @@ func (r *ModelReconciler) acquireExecutor(ctx context.Context, self *runtimev1.R
stage: stage,
stageOpts: stageOpts,
stageResultManager: stageResultManager,
finalResultManager: finalResultManager,
}
release := func() {
stageRelease()
Expand Down

0 comments on commit 92ab0cc

Please sign in to comment.