databricks-demos / dbdemos

Demos to implement your Databricks Lakehouse
Other
255 stars 80 forks source link

INVALID_PARAMETER_VALUE: Missing required embeddings parameter: 'input' #97

Closed rileynjohnson closed 5 months ago

rileynjohnson commented 5 months ago

Hoping someone can help me past this one - done quite a bit of troubleshooting to no avail.

input_data = {"input": "Embed this sentence!"} response = deploy_client.predict(endpoint="riley-databricks-bge-large-en", inputs=input_data)

HTTPError: 400 Client Error: Bad Request for url: https://eastus-c3.azuredatabricks.net/serving-endpoints/riley-databricks-bge-large-en/invocations. Response text: {"error":"Received error from databricks-model-serving","external_model_message":{"error_code":"INVALID_PARAMETER_VALUE","message":"INVALID_PARAMETER_VALUE: Missing required embeddings parameter: 'input'"}}

QuentinAmbard commented 5 months ago

hey, this looks like an issue with what your model is expecting. Depending of how you deployed your model, the input format might not be the good one. What I usually do to make it easier is take an example and save it in mlflow as the schema when I register the model (you can look at our example we always do that). Then you can open the UI and your custom BGE endpoint, and ask for an input example. It'll show you what's expected. You can also check the advanced demo if you want to see how to send a pandas dataframe directly as input type. Hope this helps!