Closed
Description
Current rerank.py calls normalize_patch
which supposes original_file_content
to be a str
, but it's already a list
now after supportation for multi-file edits. An exception is thrown because of this.
python agentless/repair/rerank.py --patch_folder results/swe-bench-lite/repair_sample_1/,results/swe-bench-lite/repair_sample_2/,results/swe-bench-lite/repair_sample_3/,results/swe-bench-lite/repair_sample_4/ \
--num_samples 40 \
--deduplicate \
--regression \
--reproduction
Traceback (most recent call last):
File "/.../Agentless/agentless/repair/rerank.py", line 337, in <module>
main()
File "/.../Agentless/agentless/repair/rerank.py", line 329, in main
normalize_patches(args)
File "/.../Agentless/agentless/repair/rerank.py", line 308, in normalize_patches
normalized_patch = normalize_patch(
^^^^^^^^^^^^^^^^
File "/.../Agentless/agentless/util/postprocess_data.py", line 425, in normalize_patch
new_content = fake_git_apply("playground", edited_file, old_content, patch)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/.../Agentless/agentless/util/postprocess_data.py", line 187, in fake_git_apply
f.write(old_content)
TypeError: write() argument must be str, not list
Agentless Commit ID I Used: 35ab2a6
BTW, would you mind to share the commit ID used in your submission on SWE-bench/experiments#133 ? With that, I would be able to continue working on it before a fix is available.
Thanks for you time and contribution to the open source community!