Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
FEAT new target class for AWS Bedrock Anthropic Claude models #699
base: main
Are you sure you want to change the base?
FEAT new target class for AWS Bedrock Anthropic Claude models #699
Changes from all commits
ed1e3ff
63a9b2e
5de223d
ac87b28
45785d6
f7a8767
57252d0
f254145
f0bc2bc
2ebb519
258f287
408c308
5865ac6
01addd1
627396a
59dcb7e
b5c4924
5d8d7e0
185bcff
2630b43
7bcb075
6d0485d
0e0e300
187cb16
3fd876b
ef3ef17
6d531d5
e7c3c54
8ddb596
b80cbda
b772a9c
e4b10d3
d88919a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
We need to skip these if boto3 isn't installed. For HuggingFace chat target we do
Maybe you can do the same? Otherwise it'll fail in the cases where boto3 isn't installed.
Similarly, you can't import boto3 at the top of the file, but you need to import inside a try-except block inside your target constructor. See hugging_face_chat_target.py for an example where we do this with torch.
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.
I've made the suggested changes and pushed them to my fork, however note that pre-commit is now complaining that "'boto3' imported but unused". Let me know if I can fix it.
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.
We added the
# noqa: F401
for that (see in the snippet above)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.
Added this for the imports in both files, also added the necessary
if TYPE_CHECKING
block at top of target file.