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]

Also create empty patch files for completeness (#725)

Kilian Lieret8559bae48591
diff --git a/run.py b/run.py
index 29a1b64e..57e14416 100644
--- a/run.py
+++ b/run.py
@@ -225,7 +225,7 @@ class SaveApplyPatchHook(MainHook):
patch_output_dir = self._traj_dir / "patches"
patch_output_dir.mkdir(exist_ok=True, parents=True)
patch_output_file = patch_output_dir / f"{instance_id}.patch"
- if not info.get("submission"):
+ if info.get("submission") is None:
logger.info("No patch to save.")
return None
model_patch = info["submission"]