-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Bug]: llamaindex is unable to connect to Sagemaker endoint using the latest llama-index and llama-index-embeddings-sagemaker-endpoint #12101
Comments
Hey @Adeel-UNSW, nice to see you back around these parts! Hope you've been well since our last chat. Thank you for providing detailed information about the issue you're facing. Based on the error message you're encountering, it seems like there's a problem with the data type of the embeddings returned by the SageMaker endpoint. The error message indicates that the value is not a valid float, which suggests that the The The Without the specific implementation details of the response = self.sagemaker_runtime_client.invoke_endpoint(
EndpointName=self.endpoint_name,
ContentType='application/json',
Body=json.dumps(payload),
Accept='application/json'
)
print(response['Body'].read().decode()) This will print the raw response from the SageMaker endpoint, which might help identify if the issue is with the response format. If the response format is correct, the issue might be with the output = self.content_handler.deserialize_output(response=response)
print(output) This will print the output of the If you're still encountering the issue after trying these solutions, it might be helpful to provide more information about your environment, such as the exact version of the I hope this helps! If you have any other questions or need further clarification, please don't hesitate to ask. Sources
|
Seems like pagemaker isn't returning proper types, it should be a |
@logan-markewich were you able to replicate this issue ? Who needs to update the integration class ? |
I don't have access to test sagemaker. I could make a guess at a fix. It's an open source library, so anyone can make a change :) |
Bug Description
I am using Llama-index version 0.10.20 and llama-index-embeddings-sagemaker-endpoint version 0.1.3. My code was working on AWS sagemaker notebook since yesterday using the 0.10.18 version of llama-index. Please see the code below
I am getting below error
**--> 235 dispatcher.event(EmbeddingEndEvent(chunks=[text], embeddings=[text_embedding]))
236 return text_embedding
File /opt/conda/lib/python3.10/site-packages/pydantic/v1/main.py:341, in BaseModel.init(pydantic_self, **data)
339 values, fields_set, validation_error = validate_model(pydantic_self.class, data)
340 if validation_error:
--> 341 raise validation_error
342 try:
343 object_setattr(pydantic_self, 'dict', values)
ValidationError: 1 validation error for EmbeddingEndEvent
embeddings -> 0 -> 0
value is not a valid float (type=type_error.float)**
Please have a look at the relevant logs when I just execute the following lines of code
Please let me know if you have any questions
Version
0.10.20
Steps to Reproduce
Relevant Logs/Tracbacks
The text was updated successfully, but these errors were encountered: