|
@@ -157,12 +157,14 @@ def initialize_runtime(
|
|
|
action = CmdRunAction(
|
|
action = CmdRunAction(
|
|
|
command=f"""echo 'export SWE_INSTANCE_ID={instance['instance_id']}' >> ~/.bashrc && echo 'export PIP_CACHE_DIR=~/.cache/pip' >> ~/.bashrc && echo "alias git='git --no-pager'" >> ~/.bashrc"""
|
|
command=f"""echo 'export SWE_INSTANCE_ID={instance['instance_id']}' >> ~/.bashrc && echo 'export PIP_CACHE_DIR=~/.cache/pip' >> ~/.bashrc && echo "alias git='git --no-pager'" >> ~/.bashrc"""
|
|
|
)
|
|
)
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command="""export USER=$(whoami); echo USER=${USER} """)
|
|
action = CmdRunAction(command="""export USER=$(whoami); echo USER=${USER} """)
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
@@ -201,18 +203,21 @@ def initialize_runtime(
|
|
|
'/swe_util/',
|
|
'/swe_util/',
|
|
|
)
|
|
)
|
|
|
action = CmdRunAction(command='cat ~/.bashrc')
|
|
action = CmdRunAction(command='cat ~/.bashrc')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command='source ~/.bashrc')
|
|
action = CmdRunAction(command='source ~/.bashrc')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command='source /swe_util/instance_swe_entry.sh')
|
|
action = CmdRunAction(command='source /swe_util/instance_swe_entry.sh')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
@@ -234,6 +239,7 @@ def initialize_runtime(
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command='git reset --hard')
|
|
action = CmdRunAction(command='git reset --hard')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
@@ -242,6 +248,7 @@ def initialize_runtime(
|
|
|
action = CmdRunAction(
|
|
action = CmdRunAction(
|
|
|
command='for remote_name in $(git remote); do git remote remove "${remote_name}"; done'
|
|
command='for remote_name in $(git remote); do git remote remove "${remote_name}"; done'
|
|
|
)
|
|
)
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
@@ -269,18 +276,21 @@ def complete_runtime(
|
|
|
workspace_dir_name = _get_swebench_workspace_dir_name(instance)
|
|
workspace_dir_name = _get_swebench_workspace_dir_name(instance)
|
|
|
|
|
|
|
|
action = CmdRunAction(command=f'cd /workspace/{workspace_dir_name}')
|
|
action = CmdRunAction(command=f'cd /workspace/{workspace_dir_name}')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command='git config --global core.pager ""')
|
|
action = CmdRunAction(command='git config --global core.pager ""')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
|
assert obs.exit_code == 0
|
|
assert obs.exit_code == 0
|
|
|
|
|
|
|
|
action = CmdRunAction(command='git add -A')
|
|
action = CmdRunAction(command='git add -A')
|
|
|
|
|
+ action.timeout = 600
|
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
logger.info(action, extra={'msg_type': 'ACTION'})
|
|
|
obs = runtime.run_action(action)
|
|
obs = runtime.run_action(action)
|
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|
|
logger.info(obs, extra={'msg_type': 'OBSERVATION'})
|