Skip to content

Commit 8ef7739

Browse files
committed
do not mount workspace for swe-eval to avoid accidentally overwrite files
1 parent a7fe663 commit 8ef7739

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

evaluation/swe_bench/swe_env_box.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import uuid
33

44
from opendevin.core.logger import opendevin_logger as logger
5-
from opendevin.runtime.docker.ssh_box import DockerSSHBox
5+
from opendevin.runtime.docker.ssh_box import SANDBOX_WORKSPACE_DIR, DockerSSHBox
66
from opendevin.runtime.plugins import JupyterRequirement, SWEAgentCommandsRequirement
77

88
SWE_BENCH_CONTAINER_IMAGE = 'ghcr.io/xingyaoww/eval-swe-bench-all:lite-v1.0'
@@ -47,7 +47,13 @@ def __init__(
4747

4848
@property
4949
def volumes(self):
50-
return {**super().volumes}
50+
# remove the default workspace mounting SANDBOX_WORKSPACE_DIR
51+
volumes = {
52+
k: v
53+
for k, v in super().volumes.items()
54+
if not v['bind'] == SANDBOX_WORKSPACE_DIR
55+
}
56+
return volumes
5157

5258
@classmethod
5359
def get_box_for_instance(

0 commit comments

Comments
 (0)