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]
SB instances: Take image_name from instance dict if available
Kilian Lieret6633913ff9e4
diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.pyindex b3e272c3..5daf6f5f 100644--- a/sweagent/run/batch_instances.py+++ b/sweagent/run/batch_instances.py@@ -150,9 +150,11 @@ class SimpleBatchInstance(BaseModel):def from_swe_bench(cls, instance: dict[str, Any]) -> Self:"""Convert instances from the classical SWE-bench dataset to the `SimpleBatchInstance` format."""iid = instance["instance_id"]- # Docker doesn't allow double underscore, so we replace them with a magic token- id_docker_compatible = iid.replace("__", "_1776_")- image_name = f"swebench/sweb.eval.x86_64.{id_docker_compatible}:latest"+ image_name = instance.get("image_name", None)+ if image_name is None:+ # Docker doesn't allow double underscore, so we replace them with a magic token+ id_docker_compatible = iid.replace("__", "_1776_")+ image_name = f"swebench/sweb.eval.x86_64.{id_docker_compatible}:latest"return cls(image_name=image_name,problem_statement=instance["problem_statement"],