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]
Improve --help message option headers (#192)
Kilian Lieret388d79f45589
diff --git a/run.py b/run.pyindex a90d9983..88ee9d79 100644--- a/run.py+++ b/run.py@@ -57,6 +57,7 @@ class ActionsArguments(FlattenedAccess, FrozenSerializable):@dataclass(frozen=True)class ScriptArguments(FlattenedAccess, FrozenSerializable):+ """Configure the control flow of the run.py script"""environment: EnvironmentArgumentsagent: AgentArgumentsactions: ActionsArgumentsdiff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex 1e7d6f63..119240fa 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -179,6 +179,7 @@ class AgentConfig(FrozenSerializable):@dataclass(frozen=True)class AgentArguments(FlattenedAccess, FrozenSerializable):+ """Configure the agent's behaviour (templates, parse functions, blocklists, ...)."""model: ModelArguments = None# Policy can only be set via config yaml file from command linediff --git a/sweagent/agent/commands.py b/sweagent/agent/commands.pyindex 311ee534..73d735a6 100644--- a/sweagent/agent/commands.py+++ b/sweagent/agent/commands.py@@ -72,7 +72,6 @@ class ParseCommand(metaclass=ParseCommandMeta):class ParseCommandBash(ParseCommand):def parse_command_file(self, path: str) -> List[Command]:- print('Parsing command file:', path)contents = open(path, "r").read()if contents.strip().startswith("#!"):commands = self.parse_script(path, contents)diff --git a/sweagent/agent/models.py b/sweagent/agent/models.pyindex 45740645..23646e02 100644--- a/sweagent/agent/models.py+++ b/sweagent/agent/models.py@@ -23,6 +23,7 @@ logger = logging.getLogger("api_models")@dataclass(frozen=True)class ModelArguments(FrozenSerializable):+ """Arguments configuring the model and its behavior."""model_name: strper_instance_cost_limit: float = 0.0total_cost_limit: float = 0.0diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.pyindex bb9b680d..52ad8365 100644--- a/sweagent/environment/swe_env.py+++ b/sweagent/environment/swe_env.py@@ -51,6 +51,8 @@ logger.propagate = False@dataclass(frozen=True)class EnvironmentArguments(FrozenSerializable):+ """Configure data sources and setup instructions for th environment in which we solve the tasks.+ """data_path: strimage_name: strsplit: str = "dev"