Skip to content

Commit

Permalink
some more refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
scaphilo committed Apr 9, 2024
1 parent ae5976a commit 55c8e07
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.9
FROM python:3.10

# Set the working directory
WORKDIR /app
Expand Down
8 changes: 8 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.8'

services:
web:
image: sweagent/swe-agent-run:latest
volumes:
- ./keys.cfg:/app/keys.cfg
- /var/run/docker.sock:/var/run/docker.sock
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def save_predictions(traj_dir, instance_id, info):
)
config_file = Path("config/default.yaml")
environment_arguments = EnvironmentArguments(
image_name="sweagent/swe-agent:latest",
image_name="ghcr.io/scaphilo/swe-agent-environment:main",
data_path="princeton-nlp/SWE-bench_Lite",
split="dev",
verbose=True,
Expand Down
2 changes: 1 addition & 1 deletion swe_agent/environment/docker_communication_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class DockerCommunicationManagement:
def __init__(self, container_name, image_name, logger):
def __init__(self, image_name, container_name, logger):
self.logger = logger
self.container_name = container_name
self.image_name = image_name
Expand Down
20 changes: 10 additions & 10 deletions swe_agent/environment/swe_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,16 @@ def __init__(self, args: EnvironmentArguments):
self.timeout = args.timeout
self.idx = 0
self.clean_multi_line_functions = lambda x: x
self.docker_communication = DockerCommunicationManagement(self.image_name,
self.container_name,
self.logger)
self.git_communication_management = GitCommunicationManagement(self.data_path,
self.is_github_url,
self.idx,
self.split,
self.logger,
self.no_mirror,
self.docker_communication,
self.docker_communication = DockerCommunicationManagement(image_name=self.image_name,
container_name=self.container_name,
logger=self.logger)
self.git_communication_management = GitCommunicationManagement(data_path=self.data_path,
is_github_url=self.is_github_url,
idx=self.idx,
split=self.split,
logger=self.logger,
no_mirror=self.no_mirror,
docker_communication=self.docker_communication,
timeout=LONG_TIMEOUT)

def get_git_communication_management(self):
Expand Down

0 comments on commit 55c8e07

Please sign in to comment.