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]
Change log icons; remove mention of agent name in logs
Kilian Lieret27e04859bfe5
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex ca32c821..ed75050a 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -406,9 +406,7 @@ class Agent:"agent": self.name,},)-- self.logger.info(f"π THOUGHT ({self.name})\n{thought}")- self.logger.info(f"π¬ ACTION ({self.name})\n{action}")+ self.logger.info(f"π THOUGHT\n{thought}\nπ¬ ACTION\n{action.strip()}")return thought, action, outputdiff --git a/sweagent/environment/config/problem_statement.py b/sweagent/environment/config/problem_statement.pyindex 75f9d40d..6a0aeb3b 100644--- a/sweagent/environment/config/problem_statement.py+++ b/sweagent/environment/config/problem_statement.py@@ -9,7 +9,7 @@ from pydantic import BaseModel, ConfigDict, Fieldfrom sweagent.utils.github import _get_problem_statement_from_github_issue, _parse_gh_issue_urlfrom sweagent.utils.log import get_logger-logger = get_logger("Config", emoji="βοΈ")+logger = get_logger("Config", emoji="π§")class ProblemStatement(Protocol):diff --git a/sweagent/environment/config/repo.py b/sweagent/environment/config/repo.pyindex 0865b475..96eed3ee 100644--- a/sweagent/environment/config/repo.py+++ b/sweagent/environment/config/repo.py@@ -12,7 +12,7 @@ from swerex.runtime.abstract import Command, UploadRequestfrom sweagent.utils.log import get_logger-logger = get_logger("Config", emoji="βοΈ")+logger = get_logger("Config", emoji="π§")class Repo(Protocol):diff --git a/sweagent/run/batch_instances.py b/sweagent/run/batch_instances.pyindex e20efad4..ccc2d2ba 100644--- a/sweagent/run/batch_instances.py+++ b/sweagent/run/batch_instances.py@@ -13,7 +13,7 @@ from sweagent.environment.config.repo import PreExistingRepofrom sweagent.environment.swe_env import EnvironmentConfigfrom sweagent.utils.log import get_logger-logger = get_logger("config", emoji="βοΈ")+logger = get_logger("config", emoji="π§")class AbstractInstanceSource(ABC):diff --git a/sweagent/run/common.py b/sweagent/run/common.pyindex 809639d0..90cdb761 100644--- a/sweagent/run/common.py+++ b/sweagent/run/common.py@@ -18,7 +18,7 @@ class BasicCLI:def __init__(self, arg_type: type[BaseSettings], default_settings: bool = True):self.arg_type = arg_typeself.default_settings = default_settings- self.logger = get_logger("CLI", emoji="βοΈ")+ self.logger = get_logger("CLI", emoji="π§")def get_args(self, args=None) -> BaseSettings:# The defaults if no config file is provideddiff --git a/sweagent/tools/tools.py b/sweagent/tools/tools.pyindex f2c32d81..7f8c5f12 100644--- a/sweagent/tools/tools.py+++ b/sweagent/tools/tools.py@@ -148,7 +148,7 @@ class ToolHandler:# partially initialized in `install_commands`.self._reset_commands = []self._command_patterns = self._get_command_patterns()- self.logger = get_logger("Tools", emoji="π§")+ self.logger = get_logger("Tools", emoji="π§°")@classmethoddef from_config(cls, config: ToolConfig) -> Self:diff --git a/sweagent/utils/config.py b/sweagent/utils/config.pyindex 8fa5c0c4..4d957f80 100644--- a/sweagent/utils/config.py+++ b/sweagent/utils/config.py@@ -8,7 +8,7 @@ from dotenv import load_dotenvfrom sweagent import REPO_ROOTfrom sweagent.utils.log import get_logger-logger = get_logger("config", emoji="βοΈ")+logger = get_logger("config", emoji="π§")def _convert_path_to_abspath(path: Path | str) -> Path: