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]

sometimes port appears instead of internal port

Talor Abramovichdea52e51fe26
diff --git a/sweagent/environment/utils.py b/sweagent/environment/utils.py
index cd8f76d7..c04332e5 100644
--- a/sweagent/environment/utils.py
+++ b/sweagent/environment/utils.py
@@ -769,7 +769,7 @@ class InstanceBuilder:
if (Path(file_path).parent / "docker-compose.yml").is_file():
logger.debug(f"Found docker_compose file in {Path(file_path).parent}")
self.args["challenge"]["docker_compose"] = Path(file_path).parent / "docker-compose.yml"
- self.args["challenge"]["port"] = challenge.get("internal_port")
+ self.args["challenge"]["port"] = challenge.get("internal_port") or challenge.get("port")
if "box" in challenge:
self.args["challenge"]["server_name"] = challenge["box"] or "127.0.0.1"
else: