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]
Fix: Ensure that submission field is present
Kilian Lieret79826f098947
diff --git a/sweagent/types.py b/sweagent/types.pyindex 6d0a0127..ee789e5b 100644--- a/sweagent/types.py+++ b/sweagent/types.py@@ -6,6 +6,7 @@ because of circular dependencies.from __future__ import annotations+import copyfrom dataclasses import dataclassfrom typing import Any, Literal, TypedDict@@ -63,7 +64,12 @@ class ReviewSubmission:messages. Trajectory is excluded because it needs special treatment."""out = {}- for k, v in self.info.items():+ info = copy.deepcopy(self.info)+ if not info.get("submission"):+ # Observed that not all exit_cost lead to autosubmission+ # so sometimes this might be missing.+ info["submission"] = ""+ for k, v in info:if isinstance(v, str):out[f"{k}{suffix}"] = velif isinstance(v, dict):