cancel
Showing results for 
Search instead for 
Did you mean: 
Machine Learning
Dive into the world of machine learning on the Databricks platform. Explore discussions on algorithms, model training, deployment, and more. Connect with ML enthusiasts and experts.
cancel
Showing results for 
Search instead for 
Did you mean: 

Error with calling a machine learning serving endpoint

notsure
New Contributor

Hi!

I have registered a spark model and generated a serving endpoint based on that.

I am calling the endpoint with the relevant dataframe, somehow I got below errors. Could anyone show me how to tackle it, please?🙏

"Exception: Request failed with status 400, {"error_code": "BAD_REQUEST", "message": "Encountered an unexpected error while evaluating the model. Verify that the serialized input Dataframe is compatible with the model for inference. Error 'requirement failed: Column features must be of type class org.apache.spark.ml.linalg.VectorUDT:struct<type:tinyint,size:int,indices:array<int>,values:array<double>> but was actually class org.apache.spark.sql.types.StringType$:string.'"}

"

2 REPLIES 2

jose_gonzalez
Databricks Employee
Databricks Employee

Hi,

Can you share the request you are sending/using? please provide a screenshot and more details, so we will be able to provide a solution.

Anonymous
Not applicable

Hi @mavis chen​ 

Thank you for posting your question in our community! We are happy to assist you.

To help us provide you with the most accurate information, could you please take a moment to review the responses and select the one that best answers your question?

This will also help other community members who may have similar questions in the future. Thank you for your participation and let us know if you need any further assistance! 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group