8000 feat: Amazon Bedrock support (Claude models) by JGalego · Pull Request #207 · SWE-agent/SWE-agent · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: Amazon Bedrock support (Claude models) #207

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.

8000 Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Apr 18, 2024

Conversation

JGalego
Copy link
Contributor
@JGalego JGalego commented Apr 12, 2024

Reference Issues/PRs

#27

What does this implement/fix? Explain your changes.

This PR fixes #27 (Claude models only).
It adds a BedrockModel class built on top of anthropic[bedrock].

docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock \
    $(env | grep AWS_ | xargs printf ' -e %s') \
    sweagent/swe-agent-run:latest \
    python run.py --image_name=sweagent/swe-agent:latest \
    --model_name bedrock:anthropic.claude-3-sonnet-20240229-v1:0 \
    --data_path https://github.com/pvlib/pvlib-python/issues/1603 \
    --config_file config/default_from_url.yaml  --skip_existing=False

@klieret klieret added this to the 0.2.1 milestone Apr 15, 2024
Copy link
codecov bot commented Apr 15, 2024

Codecov Report

Attention: Patch coverage is 19.11765% with 55 lines in your changes are missing coverage. Please review.

Project coverage is 72.29%. Comparing base (1bad3e3) to head (06c2766).
Report is 9 commits behind head on main.

Files Patch % Lines
sweagent/agent/models.py 19.11% 55 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
- Coverage   72.89%   72.29%   -0.61%     
==========================================
  Files          17       17              
  Lines        2546     2577      +31     
==========================================
+ Hits         1856     1863       +7     
- Misses        690      714      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@JGalego JGalego marked this pull request as draft April 16, 2024 15:39
@JGalego JGalego marked this pull request as ready for review April 16, 2024 17:04
Copy link
Member
@klieret klieret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Thanks a lot for putting in the time! Lmk when it's ready to merge!

@JGalego
Copy link
Contributor Author
JGalego commented Apr 16, 2024

Looking good! Thanks a lot for putting in the time! Lmk when it's ready to merge!

Retesting since the merge from main introduced some bugs (missing rich_argparse pkg when using the swe-agent-run image)

@JGalego
Copy link
Contributor Author
JGalego commented Apr 16, 2024

claude-2 is now an alias for claude-2.1 (see anthropics/anthropic-sdk-python#255), made the change in AnthropicModel (claude-2 --> claude-2.0). @klieret ready to go 🤘

@klieret
Copy link
Member
klieret commented Apr 18, 2024

Wait, one last thing: So when people specified --model claude-2 or --model claude, it picked claude-2.1, right? Then I think we should actually keep this behavior for now (this would both be in line with the anthropic issue and for reproducibility of the research results).

Copy link
Member
@klieret klieret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will merge once we settle on the claude-2.0 issue

@JGalego
Copy link
Contributor Author
JGalego commented Apr 18, 2024

Wait, one last thing: So when people specified --model claude-2 or --model claude, it picked claude-2.1, right? Then I think we should actually keep this behavior for now (this would both be in line with the anthropic issue and for reproducibility of the research results).

I'll change the alias name (claude --> claude-2) and the target (claude-2.0 --> claude-2.1)

@JGalego JGalego requested a review from klieret April 18, 2024 14:48
@klieret klieret merged commit c680b07 into SWE-agent:main Apr 18, 2024
@klieret
Copy link
Member
klieret commented Apr 18, 2024

Thanks again for all the work!

avis408 pushed a commit to emergentbase/SWE-agent-public that referenced this pull request Sep 7, 2024
…un-report-instance_ids

Make `run_report` more intuitive when using `instance_ids` filter during evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Please add support for AWS-Bedrock (Claude, etc)
2 participants
0