Skip to content
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

Merged
merged 4 commits into from
May 28, 2022

Conversation

Suresh-Nakkeran
Copy link
Contributor

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.

@Suresh-Nakkeran
Copy link
Contributor Author

/retest

@yuzisun
Copy link
Member

yuzisun commented Mar 26, 2022

@Suresh-Nakkeran Please help rebase paul's status API PR

@Suresh-Nakkeran Suresh-Nakkeran changed the title Added ModelStatus field to InferenceServiceStatus Added logic to update ModelStatus Mar 28, 2022
@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 2 times, most recently from 7d05a72 to 358941b Compare April 1, 2022 10:43
@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 4 times, most recently from b6b282f to c5a8529 Compare April 4, 2022 12:31
ss.ModelStatus.TransitionStatus = status
// Update model state to 'FailedToLoad' in case of invalid spec provided
if ss.ModelStatus.TransitionStatus == InvalidSpec {
ss.UpdateModelRevisionStates(FailedToLoad, info)
Copy link
Contributor

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.

Copy link
Member

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?

Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Contributor Author

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{
Copy link
Contributor

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?

Copy link
Member

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{
Copy link
Contributor

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{
Copy link
Contributor

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{
Copy link
Contributor

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?

@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 3 times, most recently from b9d90b1 to ffb904f Compare April 7, 2022 15:59
@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 2 times, most recently from 88cb9c4 to ee92445 Compare April 27, 2022 02:06
@Suresh-Nakkeran
Copy link
Contributor Author

/retest

@yuzisun yuzisun mentioned this pull request May 1, 2022
15 tasks
@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 3 times, most recently from c95d413 to abd1300 Compare May 16, 2022 08:00
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>
@Suresh-Nakkeran Suresh-Nakkeran force-pushed the add-modelstatus-support branch 2 times, most recently from ed0c687 to 682eb95 Compare May 23, 2022 02:44
Signed-off-by: Suresh Nakkeran <suresh.n@ideas2it.com>
@andyi2it
Copy link
Contributor

/retest

@yuzisun
Copy link
Member

yuzisun commented May 28, 2022

/lgtm
/approve

@kserve-oss-bot
Copy link
Collaborator

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kserve-oss-bot kserve-oss-bot merged commit 1a55119 into kserve:master May 28, 2022
pradithya pushed a commit to caraml-dev/merlin that referenced this pull request Jun 2, 2022
pradithya pushed a commit to caraml-dev/merlin that referenced this pull request Jun 2, 2022
…252)

* Update end to end test to cover RAW_DEPLOYMENT for model with logger

* Add rbac definition from kserve/kserve#2088
alexagriffith pushed a commit to alexagriffith/kserve that referenced this pull request Sep 19, 2022
* 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>
eric-lidong pushed a commit to eric-lidong/merlin that referenced this pull request Nov 7, 2022
…araml-dev#252)

* Update end to end test to cover RAW_DEPLOYMENT for model with logger

* Add rbac definition from kserve/kserve#2088
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

6 participants