princeton-nlp / SWE-bench

[ICLR 2024] SWE-Bench: Can Language Models Resolve Real-world Github Issues?
https://www.swebench.com
MIT License
1.81k stars 311 forks source link

run_live.py: clone_repo() takes 3 positional arguments but 5 were given #117

Closed stevensu1977 closed 3 months ago

stevensu1977 commented 4 months ago

Describe the bug

I try to use run_live.py for my test , but get clone_repo() invoke error , I checked run_live.py and bm25_retrieval.py , found run_live.py not use correct input arguments for clone_repo.

bm25_retrieval.py def clone_repo(repo, root_dir, token)

run_live.py : repo_dir = clone_repo(f"{owner}/{repo}", root_dir, token, False, thread_id)

my command: python run_live.py --model_name claude-3-sonnet-20240229 --issue_url https://github.com/huggingface/transformers/issues/26706

Steps/Code to Reproduce

bm25_retrieval.py def clone_repo(repo, root_dir, token)

run_live.py : repo_dir = clone_repo(f"{owner}/{repo}", root_dir, token, False, thread_id)

Expected Results

No error

Actual Results

Traceback (most recent call last): File "/home/ec2-user/SWE-Bench/SWE-bench/inference/run_live.py", line 276, in main(**vars(args)) File "/home/ec2-user/SWE-Bench/SWE-bench/inference/run_live.py", line 195, in main instance = make_instance( File "/home/ec2-user/SWE-Bench/SWE-bench/inference/run_live.py", line 104, in make_instance repo_dir = clone_repo(f"{owner}/{repo}", root_dir, token, False, thread_id) TypeError: clone_repo() takes 3 positional arguments but 5 were given

System Information

Python 3.10.9 Linux

john-b-yang commented 3 months ago

Tagging @carlosejimenez to address this.

john-b-yang commented 3 months ago

Just pushed commit fe2c907d9b89d535b1c16aba489c0d59b241c1d0 which should resolve this bug. The clone_repo function call should have been updated. Thanks so much for the detailed bug report and catching this!