-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added logic to update ModelStatus #2088
Added logic to update ModelStatus #2088
Conversation
26993a4
to
058d946
Compare
/retest |
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
@Suresh-Nakkeran Please help rebase paul's status API PR |
058d946
to
66ad604
Compare
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
7d05a72
to
358941b
Compare
pkg/controller/v1beta1/inferenceservice/rawkube_controller_test.go
Outdated
Show resolved
Hide resolved
b6b282f
to
c5a8529
Compare
ss.ModelStatus.TransitionStatus = status | ||
// Update model state to 'FailedToLoad' in case of invalid spec provided | ||
if ss.ModelStatus.TransitionStatus == InvalidSpec { | ||
ss.UpdateModelRevisionStates(FailedToLoad, info) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will overwrite TransitionStatus
to be BlockedByFailedLoad
which I don't think is what we want here?
I'm not sure it makes sense to update the model state here at all actually since an invalid spec doesn't affect the active model state, just means we can't fully reconcile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does not affect the active model, but invalid spec would result in model deployment failure and we should surface this error back to the user right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it will still be reflected in the transitionStatus of InvalidSpec
and the failureInfo
. I thought the distinction made sense since it isn't a model loading failure per se, the load isn't even attempted because the spec is invalid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Suresh-Nakkeran I agree here that we can remove the code updating to FailedToLoad
, the model loading has not started yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay @yuzisun
@@ -91,15 +94,27 @@ func (p *Predictor) Reconcile(isvc *v1beta1.InferenceService) error { | |||
if isvc.Spec.Predictor.Model.Runtime != nil { | |||
r, err := isvcutils.GetServingRuntime(p.client, *isvc.Spec.Predictor.Model.Runtime, isvc.Namespace) | |||
if err != nil { | |||
isvc.Status.UpdateModelTransitionStatus(v1beta1.InvalidSpec, &v1beta1.FailureInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better for InvalidSpec
here to be BlockedByFailedLoad
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njhill I think here it should be InvalidSpec
as it has not got to the point to load the model yet?
return err | ||
} | ||
|
||
if r.IsDisabled() { | ||
isvc.Status.UpdateModelTransitionStatus(v1beta1.InvalidSpec, &v1beta1.FailureInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better for InvalidSpec
here to be BlockedByFailedLoad
?
return fmt.Errorf("specified runtime %s is disabled", *isvc.Spec.Predictor.Model.Runtime) | ||
} | ||
|
||
// Verify that the selected runtime supports the specified framework. | ||
if !isvc.Spec.Predictor.Model.RuntimeSupportsModel(r) { | ||
isvc.Status.UpdateModelTransitionStatus(v1beta1.InvalidSpec, &v1beta1.FailureInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better for InvalidSpec
here to be BlockedByFailedLoad
?
@@ -110,22 +125,38 @@ func (p *Predictor) Reconcile(isvc *v1beta1.InferenceService) error { | |||
return err | |||
} | |||
if len(runtimes) == 0 { | |||
isvc.Status.UpdateModelTransitionStatus(v1beta1.InvalidSpec, &v1beta1.FailureInfo{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better for InvalidSpec
here to be BlockedByFailedLoad
?
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
b9d90b1
to
ffb904f
Compare
88cb9c4
to
ee92445
Compare
/retest |
pkg/controller/v1beta1/inferenceservice/components/predictor.go
Outdated
Show resolved
Hide resolved
b437494
to
f706f71
Compare
c95d413
to
abd1300
Compare
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
ed0c687
to
682eb95
Compare
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
682eb95
to
c1b4b7d
Compare
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Suresh-Nakkeran, yuzisun The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
…252) * Update end to end test to cover RAW_DEPLOYMENT for model with logger * Add rbac definition from kserve/kserve#2088
* added logic to update model status Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com> * added tests for modelstatus support Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com> * model status changes - incorporated review commands Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com> * adding more tests for modelstatus changes Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com> Signed-off-by: alexagriffith <agriffith96@gmail.com>
…araml-dev#252) * Update end to end test to cover RAW_DEPLOYMENT for model with logger * Add rbac definition from kserve/kserve#2088
Signed-off-by: Suresh Nakkeran suresh.n@ideas2it.com
As part of this PR, ModelStatus field is added in InferenceServiceStatus struct which will be used for updating single model deployment status and ModelMesh predictor status.