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]

Fix warnings about simple_parsing import paths (#176)

Kilian Liereteb72968a4da0
diff --git a/run.py b/run.py
index 98f6bc00..1b3d3bed 100644
--- a/run.py
+++ b/run.py
@@ -11,7 +11,8 @@ from getpass import getuser
from pathlib import Path
from rich.logging import RichHandler
from simple_parsing import parse
-from simple_parsing.helpers import FrozenSerializable, FlattenedAccess
+from simple_parsing.helpers.serialization.serializable import FrozenSerializable
+from simple_parsing.helpers.flatten import FlattenedAccess
from sweagent import (
Agent,
AgentArguments,
diff --git a/sweagent/agent/agents.py b/sweagent/agent/agents.py
index f3a37342..98c91478 100644
--- a/sweagent/agent/agents.py
+++ b/sweagent/agent/agents.py
@@ -4,7 +4,9 @@ import logging
from dataclasses import dataclass
from pathlib import Path
-from simple_parsing.helpers import field, FrozenSerializable, FlattenedAccess
+from simple_parsing.helpers.fields import field
+from simple_parsing.helpers.serialization.serializable import FrozenSerializable
+from simple_parsing.helpers.flatten import FlattenedAccess
from sweagent.agent.commands import Command, ParseCommand
from sweagent.agent.history_processors import HistoryProcessor
from sweagent.agent.models import (
diff --git a/sweagent/agent/commands.py b/sweagent/agent/commands.py
index be808485..494aac4b 100644
--- a/sweagent/agent/commands.py
+++ b/sweagent/agent/commands.py
@@ -5,7 +5,7 @@ from abc import abstractmethod
from dataclasses import dataclass
from pathlib import Path
from typing import Dict, List, Optional
-from simple_parsing.helpers import FrozenSerializable
+from simple_parsing.helpers.serialization.serializable import FrozenSerializable
@dataclass(frozen=True)
diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py
index 01239f11..8660741a 100644
--- a/sweagent/agent/models.py
+++ b/sweagent/agent/models.py
@@ -8,7 +8,7 @@ from collections import defaultdict
from anthropic import Anthropic, HUMAN_PROMPT, AI_PROMPT
from dataclasses import dataclass, fields
from openai import BadRequestError, OpenAI, AzureOpenAI
-from simple_parsing.helpers import FrozenSerializable, Serializable
+from simple_parsing.helpers.serialization.serializable import FrozenSerializable, Serializable
from sweagent.agent.commands import Command
from tenacity import (
retry,
diff --git a/sweagent/environment/swe_env.py b/sweagent/environment/swe_env.py
index 0fe193ea..4db412a5 100644
--- a/sweagent/environment/swe_env.py
+++ b/sweagent/environment/swe_env.py
@@ -16,7 +16,7 @@ from ghapi.all import GhApi
from dataclasses import dataclass
from git import Repo
from rich.logging import RichHandler
-from simple_parsing.helpers import FrozenSerializable
+from simple_parsing.helpers.serialization.serializable import FrozenSerializable
import yaml
from sweagent.environment.utils import (
copy_file_to_container,