Closed yuntongzhang closed 2 months ago
This worked for me after I added requests to the ACR conda env:
diff --git a/environment.yml b/environment.yml
index 47ef8bab..8724d85d 100644
--- a/environment.yml
+++ b/environment.yml
@@ -43,6 +43,7 @@ dependencies:
- pydantic==2.5.3
- pydantic-core==2.14.6
- python-dotenv==1.0.0
+ - requests==2.31.0
- sniffio==1.3.0
- soupsieve==2.5
- tenacity==8.2.3
I also encountered a crash because a GitHub issue had an empty body. This is my fix:
diff --git a/app/fresh_issue/common.py b/app/fresh_issue/common.py
index f420b93b..1dc4a6a6 100644
--- a/app/fresh_issue/common.py
+++ b/app/fresh_issue/common.py
@@ -62,7 +62,7 @@ class FreshTask:
)
else:
title, body, created_at = retrieved_issue
- problem_stmt = title + "\n" + body
+ problem_stmt = f"{title}\n{body}"
# save this issue into a file for reference
problem_stmt_file = pjoin(self.task_output_dir, "problem_statement.txt")
with open(problem_stmt_file, "w") as f:
pre_install_cmds: List[str] = [],
....
testcases_passing: List[str] = [],
testcases_failing: List[str] = [],
Mutable default arguments may cause problems, see here. Changing to this would be ok:
pre_install_cmds: List[str] | None = None,
....
testcases_passing: List[str] | None = None,
testcases_failing: List[str] | None = None,
and in the body:
pre_install_cmds = pre_install_cmds or []
testcases_passing = testcases_passing or []
testcases_failing = testcases_failing or []
Thank you all for your comments. I have integrated them.
Resolves #1, resolves #2, resolves #16.
Add a new mode to make ACR generate patches for new GitHub issues outside of SWE-bench.
To use:
If successful, path to the generated patch will be printed after execution.
Here are some issues that have been tested on:
Run ACR with the following command:
ACR generates the following patch:
Run ACR with the following command:
Running it for the first time did not produce a patch. After that, running it for a few more times produced the following patches (patch can be different in each run):
Patch 1:
Patch 2:
For this issue, there is already a PR (not merged yet). Patch 1 is doing the same changes as the PR.
Run ACR with the following command:
ACR generates the following patch:
Will merge this in after some more testing.
Resolves #1 , resolves #2 , resolves #16 .