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]
swe-rex exceptions moved
Kilian Lieret9f4733627ab3
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.pyindex 1b0f2115..e0e12418 100644--- a/sweagent/agent/agents.py+++ b/sweagent/agent/agents.py@@ -9,7 +9,7 @@ from typing import Any, Selffrom pydantic import BaseModel, ConfigDict, Fieldfrom simple_parsing.helpers.fields import field-from swerex.runtime.abstract import BashIncorrectSyntaxError, SweRexception+from swerex.exceptions import BashIncorrectSyntaxError, SweRexceptionfrom tenacity import RetryErrorfrom sweagent import __version__, get_agent_commit_hashdiff --git a/sweagent/agent/models.py b/sweagent/agent/models.pyindex 0758e38e..1a65053c 100644--- a/sweagent/agent/models.py+++ b/sweagent/agent/models.py@@ -9,7 +9,7 @@ import litellmimport litellm.types.utilsfrom pydantic import BaseModel as PydanticBaseModelfrom pydantic import ConfigDict, Field, SecretStr-from swerex.runtime.abstract import SweRexception+from swerex.exceptions import SweRexceptionfrom tenacity import (Retrying,retry_if_not_exception_type,diff --git a/tests/test_agent.py b/tests/test_agent.pyindex 1b6fa37a..d1eca447 100644--- a/tests/test_agent.py+++ b/tests/test_agent.py@@ -1,6 +1,7 @@import pytestimport yaml-from swerex.runtime.abstract import Action, BashObservation, Observation, SweRexception+from swerex.exceptions import SweRexception+from swerex.runtime.abstract import Action, BashObservation, Observationfrom swerex.runtime.dummy import DummyRuntimefrom sweagent import CONFIG_DIRdiff --git a/tests/test_env.py b/tests/test_env.pyindex 3ba13c9f..12841813 100644--- a/tests/test_env.py+++ b/tests/test_env.py@@ -4,7 +4,7 @@ from pathlib import Pathfrom unittest import mockimport pytest-from swerex.runtime.abstract import CommandTimeoutError+from swerex.exceptions import CommandTimeoutErrorfrom sweagent.environment.hooks.abstract import EnvHook