-
Notifications
You must be signed in to change notification settings - Fork 2.4k
FIX Bedrock LM produces extraneous key error in unclear circumstances #680
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
Conversation
|
Bedrock seems to be moving towards a new API (the "messages" API) that mirrors the OpenAI spec. Maybe it makes sense to also remove the |
|
Hi @aazizisoufiane @JamesScharf , does #720 handle this? wondering if we can close this PR and make the changes to Bedrock as @JamesScharf suggests? |
|
No, we still need : |
|
@arnavsinghvi11 @JamesScharf #720 with the new PR, I got also this error with bedrock botocore.errorfactory.ValidationException: An error occurred (ValidationException) when calling the InvokeModel operation: max_tokens_to_sample: range: 1..1,000,000 |
|
It seems like an edit to the super().init call in the Bedrock class still needs to be changed - batch_n should be False |
|
@drawal1 it seems like we could incorporate some of the AWS model error handling (particularly backoff) from this PR. feel free to suggest any comments on how to merge with the current integrations. |
|
@arnavsinghvi11 @aazizisoufiane Both the files in this PR are now obsolete. Based on a review of the backoff handler, the changes belong in the aws_providers.py file. Specifically, the call_model functions in the Bedrock and Sagemaker classes in aws_providers.py should be decorated with: The backoff code should also reside in this file |
@mikeusru - I'm not so sure about this. Pretty sure batching is now implemented in Bedrock although not all models may be supported |
got it. @aazizisoufiane could you refactor this PR to work with |
2216e76 to
6e5914f
Compare
|
@arnavsinghvi11 , thanks, the refactoring is done |
drawal1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aazizisoufiane Can you verify no regressions with tests/modules/test_aws_models.py?
|
@drawal1, I have successfully run tests for the Anthropic model. However, I'm unable to test the other models as I don't have the necessary access rights on AWS. Nevertheless, there is no reason to believe they would not pass. |
|
Hi @aazizisoufiane , can you run |
a7e3e08 to
db4fcf3
Compare
|
@arnavsinghvi11 done |
|
Thanks @aazizisoufiane ! |
FIX Bedrock LM produces extraneous key error in unclear circumstances
Bedrock LM produces extraneous key error in unclear circumstances #365