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]
Forces platform to be linux/amd64 for swe-bench batch runs (#942)
carlos52f6b455a123
diff --git a/pyproject.toml b/pyproject.tomlindex aa4eb11c..9ce13846 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -57,7 +57,7 @@ dependencies = ["litellm","GitPython","ghapi",- "swe-rex>=1.0.3",+ "swe-rex>=1.2.0","tabulate","textual>=1.0.0,<2.0.0",]diff --git a/sweagent/__init__.py b/sweagent/__init__.pyindex f925de8d..2d4f3d2a 100644--- a/sweagent/__init__.py+++ b/sweagent/__init__.py@@ -53,7 +53,7 @@ def get_agent_commit_hash() -> str:try:repo = Repo(REPO_ROOT, search_parent_directories=False)except Exception:- return ""+ return "unavailable"return repo.head.object.hexsha@@ -63,7 +63,7 @@ def get_rex_commit_hash() -> str:try:repo = Repo(Path(swerex.__file__).resolve().parent.parent.parent, search_parent_directories=False)except Exception:- return ""+ return "unavailable"return repo.head.object.hexsha@@ -77,12 +77,12 @@ def get_agent_version_info() -> str:hash = get_agent_commit_hash()rex_hash = get_rex_commit_hash()rex_version = get_rex_version()- return f"This is SWE-agent version {__version__} ({hash}) with SWE-ReX {rex_version} ({rex_hash})."+ return f"This is SWE-agent version {__version__} ({hash=}) with SWE-ReX version {rex_version} ({rex_hash=})."def impose_rex_lower_bound() -> None:rex_version = get_rex_version()- minimal_rex_version = "1.1.0"+ minimal_rex_version = "1.2.0"if version.parse(rex_version) < version.parse(minimal_rex_version):msg = (f"SWE-ReX version {rex_version} is too old. Please update to at least {minimal_rex_version}. "diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.pyindex 57e1dcec..b35c5bef 100644--- a/sweagent/run/batch_instances.py+++ b/sweagent/run/batch_instances.py@@ -269,6 +269,7 @@ class SWEBenchInstances(BaseModel, AbstractInstanceSource):from datasets import load_datasetds: list[dict[str, Any]] = load_dataset(self._get_huggingface_name(), split=self.split) # type: ignore+ self.deployment.platform = "linux/amd64"instances = [SimpleBatchInstance.from_swe_bench(instance).to_full_batch_instance(self.deployment) for instance in ds]