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

model with name <inference service name> does not exist. #3682

Open
VikasAbhishek opened this issue May 13, 2024 · 8 comments
Open

model with name <inference service name> does not exist. #3682

VikasAbhishek opened this issue May 13, 2024 · 8 comments
Labels

Comments

@VikasAbhishek
Copy link

/kind bug

What steps did you take and what happened:
I ran the inference service on custom xgboost model that I trained and saved in .joblib extension using the pvc storage option, followed the link
https://kserve.github.io/website/master/modelserving/storage/pvc/pvc/

I have used the port forward and node port to get the ingress host and port.
Inference service and pods are running fine.
after running the curl command I am getting this error:

  • Trying 127.0.0.1:8080...
  • TCP_NODELAY set
  • Connected to localhost (127.0.0.1) port 8080 (#0)

POST /v1/models/xgboost-pvc:predict HTTP/1.1
Host: xgboost-pvc.default.example.com
User-Agent: curl/7.68.0
Accept: /
Content-Type: application/json
Content-Length: 646

  • upload completely sent off: 646 out of 646 bytes
  • Mark bundle as not supporting multiuse
    < HTTP/1.1 404 Not Found
    < content-length: 55
    < content-type: application/json
    < date: Mon, 13 May 2024 06:02:43 GMT
    < server: istio-envoy
    < x-envoy-upstream-service-time: 16
    <
  • Connection #0 to host localhost left intact
    {"error":"Model with name xgboost-pvc does not exist."}

What did you expect to happen:
I expected that the curl command will return the predictions.

What's the InferenceService yaml:
[To help us debug please run kubectl get isvc $name -n $namespace -o yaml and paste the output]

apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"serving.kserve.io/v1beta1","kind":"InferenceService","metadata":{"annotations":{},"name":"xgboost-pvc","namespace":"default"},"spec":{"predictor":{"xgboost":{"storageUri":"pvc://task-pv-claim/model/S1-B2-C1_xgboost.joblib"}}}}
creationTimestamp: "2024-05-10T11:16:48Z"
finalizers:

  • inferenceservice.finalizers
    generation: 1
    name: xgboost-pvc
    namespace: default
    resourceVersion: "1804889"
    uid: efbe751b-9865-47a3-a84a-501f14bc9618
    spec:
    predictor:
    model:
    modelFormat:
    name: xgboost
    name: ""
    resources: {}
    storageUri: pvc://task-pv-claim/model/S1-B2-C1_xgboost.joblib
    status:
    address:
    url: http://xgboost-pvc.default.svc.cluster.local
    components:
    predictor:
    address:
    url: http://xgboost-pvc-predictor.default.svc.cluster.local
    latestCreatedRevision: xgboost-pvc-predictor-00001
    latestReadyRevision: xgboost-pvc-predictor-00001
    latestRolledoutRevision: xgboost-pvc-predictor-00001
    traffic:
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    status: "True"
    type: IngressReady
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    severity: Info
    status: "True"
    type: LatestDeploymentReady
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    severity: Info
    status: "True"
    type: PredictorConfigurationReady
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    status: "True"
    type: PredictorReady
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    severity: Info
    status: "True"
    type: PredictorRouteReady
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    status: "True"
    type: Ready
  • lastTransitionTime: "2024-05-10T11:17:11Z"
    severity: Info
    status: "True"
    type: RoutesReady
    modelStatus:
    copies:
    failedCopies: 0
    totalCopies: 1
    states:
    activeModelState: Loaded
    targetModelState: Loaded
    transitionStatus: UpToDate
    observedGeneration: 1
    url: http://xgboost-pvc.default.example.com

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]
when I checked the logs of xgboost predictor pod after running the curl command I am getting this:
2024-05-13 05:16:25.231 1 kserve ERROR [model_not_found_handler():113] Exception:
Traceback (most recent call last):
File "/prod_venv/lib/python3.9/site-packages/starlette/_exception_handler.py", line 53, in wrapped_app
await app(scope, receive, sender)
File "/prod_venv/lib/python3.9/site-packages/starlette/routing.py", line 74, in app
response = await func(request)
File "/prod_venv/lib/python3.9/site-packages/fastapi/routing.py", line 299, in app
raise e
File "/prod_venv/lib/python3.9/site-packages/fastapi/routing.py", line 294, in app
raw_response = await run_endpoint_function(
File "/prod_venv/lib/python3.9/site-packages/fastapi/routing.py", line 191, in run_endpoint_function
return await dependant.call(**values)
File "/kserve/kserve/protocol/rest/v1_endpoints.py", line 67, in predict
model_ready = self.dataplane.model_ready(model_name)
File "/kserve/kserve/protocol/dataplane.py", line 213, in model_ready
raise ModelNotFound(model_name)
kserve.errors.ModelNotFound: Model with name xgboost-pvc does not exist.
2024-05-13 05:16:25.232 uvicorn.access INFO: 10.244.2.5:0 1 - "POST /v1/models/xgboost-pvc%3Apredict HTTP/1.1" 404 Not Found
2024-05-13 05:16:25.233 kserve.trace kserve.io.kserve.protocol.rest.v1_endpoints.predict: 0.0017123222351074219
2024-05-13 05:16:25.233 kserve.trace kserve.io.kserve.protocol.rest.v1_endpoints.predict: 0.0017050000001290755

Environment:

  • Istio Version: 1.19.4

  • Knative Version: 1.10.1

  • KServe Version: 0.12.1

  • Kubeflow version: not installed

  • Cloud Environment:[k8s_istio/istio_dex/gcp_basic_auth/gcp_iap/aws/aws_cognito/ibm]

  • Minikube/Kind version: kind version 0.22.0

  • Kubernetes version: (use kubectl version) : Client Version: v1.30.0
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.29.2

  • OS (e.g. from /etc/os-release): Distributor ID: Ubuntu
    Description: Ubuntu 20.04.6 LTS
    Release: 20.04
    Codename: focal

@sivanantha321
Copy link
Member

@VikasAbhishek Can you post the response of http://${Host}:${Port}/v1/models

@VikasAbhishek
Copy link
Author

@VikasAbhishek Can you post the response of http://${Host}:${Port}/v1/models

  • Trying 127.0.0.1:8080...
  • TCP_NODELAY set
  • Connected to localhost (127.0.0.1) port 8080 (#0)

GET /v1/models HTTP/1.1
Host: localhost:8080
User-Agent: curl/7.68.0
Accept: /

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 404 Not Found
    < date: Mon, 13 May 2024 06:49:27 GMT
    < server: istio-envoy
    < content-length: 0
    <
  • Connection #0 to host localhost left intact

@VikasAbhishek VikasAbhishek reopened this May 13, 2024
@sivanantha321
Copy link
Member

Have you added Host header ?

@VikasAbhishek
Copy link
Author

VikasAbhishek commented May 13, 2024 via email

@VikasAbhishek
Copy link
Author

VikasAbhishek commented May 13, 2024 via email

@sivanantha321
Copy link
Member

sivanantha321 commented May 13, 2024

@VikasAbhishek The response is not available in your comment, anyways you can verify if the model is ready, and can view the model name. Try using this as the model name for inference . If the response is empty, this may mean that the model is not loaded. In that case please, verify the model server logs.

@VikasAbhishek
Copy link
Author

VikasAbhishek commented May 13, 2024 via email

@sivanantha321
Copy link
Member

@VikasAbhishek As mentioned earlier, the model is not loaded. Please, verify the model server logs and storage initializer logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants