Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Change: Make anthropic_filemap the new default config (#927)

Kilian Lieret7f84e202e22b
diff --git a/config/anthropic_filemap.yaml b/config/anthropic_filemap.yaml
new file mode 100644
index 00000000..671c172b
--- /dev/null
+++ b/config/anthropic_filemap.yaml
@@ -0,0 +1,60 @@
+# This template is heavily inspired by anthropic's computer use demo
+agent:
+ templates:
+ system_template: |-
+ You are a helpful assistant that can interact with a computer to solve tasks.
+ instance_template: |-
+ <uploaded_files>
+ {{working_dir}}
+ </uploaded_files>
+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:
+
+ <pr_description>
+ {{problem_statement}}
+ </pr_description>
+
+ Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?
+ I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!
+ Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.
+ Follow these steps to resolve the issue:
+ 1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>
+ 2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error
+ 3. Edit the sourcecode of the repo to resolve the issue
+ 4. Rerun your reproduce script and confirm that the error is fixed!
+ 5. Think about edgecases and make sure your fix handles them as well
+ Your thinking should be thorough and so it's fine if it's very long.
+ next_step_template: |-
+ OBSERVATION:
+ {{observation}}
+ next_step_no_output_template: |-
+ Your command ran successfully and did not produce any output.
+ tools:
+ bundles:
+ - path: tools/registry
+ - path: tools/edit_anthropic
+ - path: tools/review_on_submit_m
+ registry_variables:
+ USE_FILEMAP: 'true'
+ SUBMIT_REVIEW_MESSAGES:
+ - |
+ Thank you for your work on this issue. Please carefully follow the steps below to help review your changes.
+
+ 1. If you made any changes to your code after running the reproduction script, please run the reproduction script again.
+ If the reproduction script is failing, please revisit your changes and make sure they are correct.
+ If you have already removed your reproduction script, please ignore this step.
+ 2. Remove your reproduction script (if you haven't done so already).
+ 3. If you have modified any TEST files, please revert them to the state they had before you started fixing the issue.
+ You can do this with `git checkout -- /path/to/test/file.py`. Use below <diff> to find the files you need to revert.
+ 4. Run the submit command again to confirm.
+
+ Here is a list of all of your changes:
+
+ <diff>
+ {{diff}}
+ </diff>
+ enable_bash_tool: true
+ parse_function:
+ type: function_calling
+ history_processors:
+ - type: cache_control
+ last_n_messages: 2
diff --git a/config/function_calling_replace_late_repro_no_hp_no_demo.yaml b/config/function_calling_replace_late_repro_no_hp_no_demo.yaml
deleted file mode 100644
index c4367cc0..00000000
--- a/config/function_calling_replace_late_repro_no_hp_no_demo.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
-# This config file is meant to be directly compared with
-# - function_calling_anthropic_openhands.yaml
-# - function_calling_anthropic_replace_late_repro_no_hp_no_demo.yaml
-# In particular: no HP, no search, no demo
-# Config version: 1
-agent:
- templates:
- system_template: |-
- SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.
-
- The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.
- In addition to typical bash commands, you can also use specific commands to help you navigate and edit files.
- To call a command, you need to invoke it with a function call/tool call.
-
- Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.
-
- For example, if you are looking at this file:
-
- def fct():
- print("Hello world")
-
- and you want to edit the file to read:
-
- def fct():
- print("Hello")
- print("world")
-
- you search string should be `Hello world` and your replace string should be `"Hello"\n print("world")`
- (note the extra spaces before the print statement!).
-
- You could also get the same result by search for ` print("Hello world")` and replace with ` print("Hello")\n print("world")`.
-
- RESPONSE FORMAT:
- Your shell prompt is formatted as follows:
- (Open file: <path>)
- (Current directory: <cwd>)
- bash-$
-
- First, you should _always_ include a general thought about what you're going to do next.
- Then, for every response, you must include exactly _ONE_ tool call/function call.
-
- Remember, you should always include a _SINGLE_ tool call/function call and then wait for a response from the shell before continuing with more discussion and commands. Everything you include in the DISCUSSION section will be saved for future reference.
- If you'd like to issue two commands at once, PLEASE DO NOT DO THAT! Please instead first submit just the first tool call, and then after receiving a response you'll be able to issue the second .
- Note that the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.
- instance_template: |-
- We're currently solving the following issue within our repository. Here's the issue text:
- ISSUE:
- {{problem_statement}}
-
- INSTRUCTIONS:
- Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.
- Remember, YOU SHOULD ALWAYS INCLUDE EXACTLY ONE TOOL CALL/FUNCTION CALL PER RESPONSE.
- When you're satisfied with all of the changes you've made, you can submit your changes to the code base by simply running the submit command.
- Note however that you cannot use any interactive session commands (e.g. python, vim) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with the python command.
-
- NOTE ABOUT THE EDIT COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
-
- GENERAL IMPORTANT TIPS:
-
- 1. If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it!
-
- 2. If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, don't just use the scroll_down command multiple times. Instead, use the goto 583 command. It's much quicker.
-
- 3. If the bug reproduction script requires inputting/reading a specific file, such as buggy-input.png, and you'd like to understand how to input that file, conduct a search in the existing repo code, to see whether someone else has already done that. Do this by running the command: find_file "buggy-input.png" If that doesn't work, use the linux 'find' command.
-
- 4. Always make sure to look at the currently open file and the current working directory (which appears right after the currently open file). The currently open file might be in a different directory than the working directory! Note that some commands, such as 'create', open files, so they might change the current open file.
-
- 5. When editing files, it is easy to accidentally to write code with incorrect indentation or make other mistakes. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
-
- 6. When editing files, first explain the code you want to edit and why it is causing the problem. Then explain the edit you want to make and how it fixes the problem. Explain how the edit does not break existing functionality.
-
- 7. Do not try to install any packages with `pip`, `conda`, or any other way. This will usually not work. If the environment is not set up correctly, try to fix the issue without executing python code or running any tests that require the package installed.
-
- STRATEGY:
-
- 1. Locate relevant files using the find and search commands, then read the code related to the issue.
-
- 2. Try to replicate the bug that the issues discusses.
- If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment, and run it to make sure you can reproduce the bug.
- Then start trying to fix it.
-
- If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file,
- so that you can be sure that the script indeed ran fine all the way through.
-
- 3. Use the `edit` command to perform edits on the files that cause the issue.
-
- 4. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the bug has indeed been fixed.
-
- 5. Create additional tests to verify the fix in a style similar to the existing reproduction script. In particular, make sure to test edge cases.
- If you find any issues, go back to the file you edited and perform further edits.
-
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_template: |-
- {{observation}}
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_no_output_template: |-
- Your command ran successfully and did not produce any output.
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- demonstrations:
- - trajectories/demonstrations/function_calling_simple.traj
- put_demos_in_history: true
- tools:
- submit_command: "submit -f"
- env_variables:
- WINDOW: 100
- OVERLAP: 2
- bundles:
- - path: tools/registry
- - path: tools/defaults
- - path: tools/edit_replace
- - path: tools/submit
- enable_bash_tool: true
- parse_function:
- type: function_calling
diff --git a/config/function_calling_replace_late_repro_review_submit.yaml b/config/function_calling_replace_late_repro_review_submit.yaml
deleted file mode 100644
index 6f23b30f..00000000
--- a/config/function_calling_replace_late_repro_review_submit.yaml
+++ /dev/null
@@ -1,169 +0,0 @@
-agent:
- templates:
- system_template: |-
- SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.
-
- The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.
- In addition to typical bash commands, you can also use specific commands to help you navigate and edit files.
- To call a command, you need to invoke it with a function call/tool call.
-
- Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.
-
- For example, if you are looking at this file:
-
- def fct():
- print("Hello world")
-
- and you want to edit the file to read:
-
- def fct():
- print("Hello")
- print("world")
-
- you search string should be `Hello world` and your replace string should be `"Hello"\n print("world")`
- (note the extra spaces before the print statement!).
-
- You could also get the same result by search for ` print("Hello world")` and replace with ` print("Hello")\n print("world")`.
-
- RESPONSE FORMAT:
- Your shell prompt is formatted as follows:
- (Open file: <path>)
- (Current directory: <cwd>)
- bash-$
-
- First, you should _always_ include a general thought about what you're going to do next.
- Then, for every response, you must include exactly _ONE_ tool call/function call.
-
- Remember, you should always include a _SINGLE_ tool call/function call and then wait for a response from the shell before continuing with more discussion and commands. Everything you include in the DISCUSSION section will be saved for future reference.
- If you'd like to issue two commands at once, PLEASE DO NOT DO THAT! Please instead first submit just the first tool call, and then after receiving a response you'll be able to issue the second .
- Note that the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.
- instance_template: |-
- We're currently solving the following issue within our repository. Here's the issue text:
- ISSUE:
- {{problem_statement}}
-
- INSTRUCTIONS:
- Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.
- Remember, YOU SHOULD ALWAYS INCLUDE EXACTLY ONE TOOL CALL/FUNCTION CALL PER RESPONSE.
- When you're satisfied with all of the changes you've made, you can submit your changes to the code base by simply running the submit command.
- Note however that you cannot use any interactive session commands (e.g. python, vim) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with the python command.
-
- NOTE ABOUT THE EDIT COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
-
- GENERAL IMPORTANT TIPS:
-
- 1. If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it!
-
- 2. If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, don't just use the scroll_down command multiple times. Instead, use the goto 583 command. It's much quicker.
-
- 3. If the bug reproduction script requires inputting/reading a specific file, such as buggy-input.png, and you'd like to understand how to input that file, conduct a search in the existing repo code, to see whether someone else has already done that. Do this by running the command: find_file "buggy-input.png" If that doesn't work, use the linux 'find' command.
-
- 4. Always make sure to look at the currently open file and the current working directory (which appears right after the currently open file). The currently open file might be in a different directory than the working directory! Note that some commands, such as 'create', open files, so they might change the current open file.
-
- 5. When editing files, it is easy to accidentally to write code with incorrect indentation or make other mistakes. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
-
- 6. When editing files, first explain the code you want to edit and why it is causing the problem. Then explain the edit you want to make and how it fixes the problem. Explain how the edit does not break existing functionality.
-
- 7. Do not try to install any packages with `pip`, `conda`, or any other way. This will usually not work. If the environment is not set up correctly, try to fix the issue without executing python code or running any tests that require the package installed.
-
- STRATEGY:
-
- 1. Locate relevant files using the find and search commands, then read the code related to the issue.
-
- 2. Try to replicate the bug that the issues discusses.
- If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment, and run it to make sure you can reproduce the bug.
- Then start trying to fix it.
-
- If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file,
- so that you can be sure that the script indeed ran fine all the way through.
-
- 3. Use the `edit` command to perform edits on the files that cause the issue.
-
- 4. When you think you've fixed the bug, re-run the bug reproduction script to make sure that the bug has indeed been fixed.
-
- 5. Create additional tests to verify the fix in a style similar to the existing reproduction script. In particular, make sure to test edge cases.
- If you find any issues, go back to the file you edited and perform further edits.
- Put these tests in the same file as the bug reproduction script.
-
- 6. Many packages have tests. Please also take a look at any relevant tests related to the problem you are fixing or the
- code you are editing. Do not try to run them yet, just look at them to understand how the code is tested and what
- functionality is tested. Do NOT modify the existing tests!
-
- <IMPORTANT>
- * Never modify existing tests! Only add new tests to a reproduce.py script or similar (NOT to the existing test directory).
- * Make sure to remove these tests before submitting your changes.
- </IMPORTANT>
-
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_template: |-
- {{observation}}
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_no_output_template: |-
- Your command ran successfully and did not produce any output.
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- demonstrations:
- - trajectories/demonstrations/function_calling_simple.traj
- put_demos_in_history: true
- tools:
- submit_command: "submit -f"
- execution_timeout: 120
- env_variables:
- WINDOW: 100
- OVERLAP: 2
- SUBMIT_REVIEW_MESSAGE: |-
- Thank you for your work on this issue.
-
- As a refresher, this is the issue we're solving:
-
- <issue_text>
- {{problem_statement}}
- </issue_text>
-
- Here are your changes:
-
- <diff>
- {{diff}}
- </diff>
-
- Before we submit your changes, here are some final instructions to review:
-
- 1. Does the diff <diff> look correct or could it introduce any problems?
- 2. Does the diff <diff> solve the problem explained in the issue <issue_text>?
- 3. Were you able to reproduce and then fix the bug? If you had trouble with the reproduction, are there any other
- ways you could double-check that the bug is fixed?
- 4. Is there any existing functionality that could be broken by your changes?
- 5. Did you test or think of any edge cases?
- 6. Many packages come with tests. Have you tried to run them? You might have to install pytest (`pip install pytest`) to run them.
- first. VERY IMPORTANT THOUGH: First locate all relevant tests and only run these (`pytest -k ...`). DO NOT RUN ALL TESTS!
- Running all tests will take a long time and probably not work.
-
- Please write a DETAILED response to the above questions.
- You can also run additional checks and tests if you want.
- If you find anything to be problematic, please fix it.
-
- Once you're done, run the submit command to submit your changes.
-
- <IMPORTANT>
- 1. Please be verbose and think things through step-by-step.
- 2. Do not run pytest without specifying the tests you want to run. It will take too long.
- 3. Never modify existing tests! Only add new tests to a reproduce.py script or similar (NOT to the existing test directory).
- Make sure to remove these tests before submitting your changes.
- </IMPORTANT>
- bundles:
- - path: tools/registry
- - path: tools/defaults
- - path: tools/search
- - path: tools/edit_replace
- - path: tools/review_on_submit
- enable_bash_tool: true
- parse_function:
- type: function_calling
- history_processors:
- - type: last_n_observations
- n: 5
diff --git a/config/function_calling_rewrite.yaml b/config/function_calling_rewrite.yaml
deleted file mode 100644
index 46cf8259..00000000
--- a/config/function_calling_rewrite.yaml
+++ /dev/null
@@ -1,89 +0,0 @@
-agent:
- templates:
- system_template: |-
- SETTING: You are an autonomous programmer, and you're working directly in the command line with a special interface.
-
- The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.
- In addition to typical bash commands, you can also use specific commands to help you navigate and edit files.
- To call a command, you need to invoke it with a function call/tool call.
-
- Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.
-
- RESPONSE FORMAT:
- Your shell prompt is formatted as follows:
- (Open file: <path>)
- (Current directory: <cwd>)
- bash-$
-
- First, you should _always_ include a general thought about what you're going to do next.
- Then, for every response, you must include exactly _ONE_ tool call/function call.
-
- Remember, you should always include a _SINGLE_ tool call/function call and then wait for a response from the shell before continuing with more discussion and commands. Everything you include in the DISCUSSION section will be saved for future reference.
- If you'd like to issue two commands at once, PLEASE DO NOT DO THAT! Please instead first submit just the first tool call, and then after receiving a response you'll be able to issue the second .
- Note that the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.
- instance_template: |-
- We're currently solving the following issue within our repository. Here's the issue text:
- ISSUE:
- {{problem_statement}}
-
- INSTRUCTIONS:
- Now, you're going to solve this issue on your own. Your terminal session has started and you're in the repository's root directory. You can use any bash commands or the special interface to help you. Edit all the files you need to and run any checks or tests that you want.
- Remember, YOU SHOULD ALWAYS INCLUDE EXACTLY ONE TOOL CALL/FUNCTION CALL PER RESPONSE.
- When you're satisfied with all of the changes you've made, you can submit your changes to the code base by simply running the submit command.
- Note however that you cannot use any interactive session commands (e.g. python, vim) in this environment, but you can write scripts and run them. E.g. you can write a python script and then run it with the python command.
-
- NOTE ABOUT THE EDIT COMMAND: Indentation really matters! When editing a file, make sure to insert appropriate indentation before each line!
-
- IMPORTANT TIPS:
- 1. Always start by trying to replicate the bug that the issues discusses.
- If the issue includes code for reproducing the bug, we recommend that you re-implement that in your environment, and run it to make sure you can reproduce the bug.
- Then start trying to fix it.
- When you think you've fixed the bug, re-run the bug reproduction script to make sure that the bug has indeed been fixed.
-
- If the bug reproduction script does not print anything when it successfully runs, we recommend adding a print("Script completed successfully, no errors.") command at the end of the file,
- so that you can be sure that the script indeed ran fine all the way through.
-
- 2. If you run a command and it doesn't work, try running a different command. A command that did not work once will not work the second time unless you modify it!
-
- 3. If you open a file and need to get to an area around a specific line that is not in the first 100 lines, say line 583, don't just use the scroll_down command multiple times. Instead, use the goto 583 command. It's much quicker.
-
- 4. If the bug reproduction script requires inputting/reading a specific file, such as buggy-input.png, and you'd like to understand how to input that file, conduct a search in the existing repo code, to see whether someone else has already done that. Do this by running the command: find_file "buggy-input.png" If that doesn't work, use the linux 'find' command.
-
- 5. Always make sure to look at the currently open file and the current working directory (which appears right after the currently open file). The currently open file might be in a different directory than the working directory! Note that some commands, such as 'create', open files, so they might change the current open file.
-
- 6. When editing files, it is easy to accidentally to write code with incorrect indentation or make other mistakes. Always check the code after you issue an edit to make sure that it reflects what you wanted to accomplish. If it didn't, issue another command to fix it.
-
- 7. Do not try to install any packages with `pip`, `conda`, or any other way. This will usually not work. If the environment is not set up correctly, try to fix the issue without executing python code or running any tests that require the package installed.
-
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_template: |-
- {{observation}}
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- next_step_no_output_template: |-
- Your command ran successfully and did not produce any output.
- (Open file: {{open_file}})
- (Current directory: {{working_dir}})
- bash-$
- demonstrations:
- - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__function_calling_replace__install-1/marshmallow-code__marshmallow-1867.traj
- put_demos_in_history: true
- tools:
- env_variables:
- WINDOW: 100
- OVERLAP: 2
- bundles:
- - path: tools/registry
- - path: tools/defaults
- - path: tools/search
- - path: tools/edit_rewrite
- - path: tools/submit
- enable_bash_tool: true
- parse_function:
- type: function_calling
- history_processors:
- - type: last_n_observations
- n: 5
diff --git a/config/sweagent_heavy.yaml b/config/sweagent_heavy.yaml
new file mode 100644
index 00000000..bf977032
--- /dev/null
+++ b/config/sweagent_heavy.yaml
@@ -0,0 +1,184 @@
+# This template is heavily inspired by anthropic's computer use demo
+agent:
+ type: retry
+ agent_configs:
+ # +filemap
+ - type: default
+ model: &model
+ name: claude-3-5-sonnet-20241022
+ api_key: $CLAUDE_API_KEY_ROTATION
+ per_instance_cost_limit: 1.5
+ per_instance_call_limit: 75
+ total_cost_limit: 1000.0
+ temperature: 0.0
+ delay: 1.0
+ templates:
+ system_template: &system_template |-
+ You are a helpful assistant that can interact with a computer to solve tasks.
+ instance_template: &instance_template |-
+ <uploaded_files>
+ {{working_dir}}
+ </uploaded_files>
+ I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:
+
+ <pr_description>
+ {{problem_statement}}
+ </pr_description>
+
+ Can you help me implement the necessary changes to the repository so that the requirements specified in the <pr_description> are met?
+ I've already taken care of all changes to any of the test files described in the <pr_description>. This means you DON'T have to modify the testing logic or any of the tests in any way!
+ Your task is to make the minimal changes to non-tests files in the {{working_dir}} directory to ensure the <pr_description> is satisfied.
+ Follow these steps to resolve the issue:
+ 1. As a first step, it might be a good idea to find and read code relevant to the <pr_description>
+ 2. Create a script to reproduce the error and execute it with `python <filename.py>` using the bash tool, to confirm the error
+ 3. Edit the sourcecode of the repo to resolve the issue
+ 4. Rerun your reproduce script and confirm that the error is fixed!
+ 5. Think about edgecases and make sure your fix handles them as well
+ Your thinking should be thorough and so it's fine if it's very long.
+ next_step_template: &next_step_no_diff |-
+ OBSERVATION:
+ {{observation}}
+ next_step_no_output_template: &next_step_no_output_no_diff |-
+ Your last command ran successfully and did not produce any output.
+ tools:
+ execution_timeout: &execution_timeout 300
+ bundles: &vanilla_bundles
+ - path: tools/registry
+ - path: tools/edit_anthropic
+ - path: tools/review_on_submit_m
+ - path: tools/diff_state
+ enable_bash_tool: true
+ parse_function: &parse_function
+ type: function_calling
+ registry_variables:
+ USE_FILEMAP: 'true'
+ SUBMIT_REVIEW_MESSAGES: &submit_review_messages
+ - |
+ Thank you for your work on this issue. Please carefully follow the steps below to help review your changes.
+
+ 1. If you made any changes to your code after running the reproduction script, please run the reproduction script again.
+ If the reproduction script is failing, please revisit your changes and make sure they are correct.
+ If you have already removed your reproduction script, please ignore this step.
+ 2. Remove your reproduction script (if you haven't done so already).
+ 3. If you have modified any TEST files, please revert them to the state they had before you started fixing the issue.
+ You can do this with `git checkout -- /path/to/test/file.py`. Use below <diff> to find the files you need to revert.
+ 4. Run the submit command again to confirm.
+
+ Here is a list of all of your changes:
+
+ <diff>
+ {{diff}}
+ </diff>
+ history_processors: &vanilla_history_processors
+ - type: cache_control
+ last_n_messages: 2
+ # vanilla anthropic
+ - type: default
+ model: *model
+ templates:
+ system_template: *system_template
+ instance_template: *instance_template
+ next_step_template: *next_step_no_diff
+ next_step_no_output_template: *next_step_no_output_no_diff
+ tools:
+ execution_timeout: *execution_timeout
+ bundles: *vanilla_bundles
+ enable_bash_tool: true
+ parse_function: *parse_function
+ registry_variables:
+ SUBMIT_REVIEW_MESSAGES: *submit_review_messages
+ history_processors: *vanilla_history_processors
+ # + state
+ - type: default
+ model: *model
+ templates:
+ system_template: *system_template
+ instance_template: *instance_template
+ next_step_template: &next_step_with_diff |-
+ {% if diff %}
+ <diff>
+ Your cumulative changes so far:
+ {{diff}}
+ </diff>
+
+ {% endif %}
+ The observation from the last command:
+ {{observation}}
+ next_step_no_output_template: &next_step_no_output_with_diff |-
+ {% if diff %}
+ <diff>
+ Your cumulative changes so far:
+ {{diff}}
+ </diff>
+ {% endif %}
+
+ Your last command ran successfully and did not produce any output.
+ tools:
+ execution_timeout: *execution_timeout
+ bundles: *vanilla_bundles
+ enable_bash_tool: true
+ parse_function: *parse_function
+ registry_variables:
+ SUBMIT_REVIEW_MESSAGES: *submit_review_messages
+ history_processors: &diff_history_processors
+ - type: remove_regex
+ keep_last: 2
+ remove:
+ - "<diff>.*</diff>"
+ - type: cache_control
+ last_n_messages: 2
+ last_n_messages_offset: 2
+ retry_loop:
+ type: chooser
+ cost_limit: 6.0
+ max_attempts: 10
+ min_budget_for_new_attempt: 1.0
+ chooser:
+ system_template: |
+ You are an expert software engineer reviewing code. Your thinking is very thorough, so it is ok if its very long.
+ instance_template: |
+ You will be given a problem statement and a list of patch submissions.
+
+ Pick the most reasonable patch.
+ The patch should solve the problem described in the problem statement in a way that is consistent with the rest of the codebase and the conventions of the codebase.
+
+ Note: Disregard all testing code in the patch, as testing was already done in a separate step.
+ Having a test in the patch does not make it any better.
+
+ <IMPORTANT>The last line of your response should be the index of the patch you chose.
+ You must choose a single index no matter what. If you cannot decide between two or more
+ submissions, choose the first one of these.
+ </IMPORTANT>
+
+ Problem statement:
+ {{problem_statement}}
+
+ Submissions:
+ {% for submission in submissions %}
+ Submission {{loop.index0}}:
+
+ {{submission}}
+
+ {% endfor %}
+
+ <IMPORTANT>The last line of your response should be the index of the patch you chose without any other text.</IMPORTANT>
+ submission_template: |
+ Patch:
+
+ ```python
+ {{submission}}
+ ```
+
+ The final edited file with 30 lines of context:
+
+ ```python
+ {{edited_files30}}
+ ```
+ max_len_submission: &chooser_max_len_submission 5000
+ model: &chooser_model
+ name: o1
+ top_p: null
+ temperature: 1.
+ per_instance_cost_limit: 30
+ completion_kwargs:
+ reasoning_effort: "high"
\ No newline at end of file
diff --git a/sweagent/run/common.py b/sweagent/run/common.py
index 74df9a10..b9779884 100644
--- a/sweagent/run/common.py
+++ b/sweagent/run/common.py
@@ -289,7 +289,7 @@ class BasicCLI:
_loaded = yaml.safe_load(txt)
config_merged.update(_loaded)
elif self.default_settings and not cli_args.no_config_file:
- config_file = CONFIG_DIR / "default.yaml"
+ config_file = CONFIG_DIR / "anthropic_filemap.yaml"
config_files.append(config_file)
msg = (
f"Loading default config from {config_file}, because no other "