From 6eab6e32d3999afecf59b53530e80e7883270af4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=AE=AE=E0=AE=A9=E0=AF=8B=E0=AE=9C=E0=AF=8D=E0=AE=95?= =?UTF-8?q?=E0=AF=81=E0=AE=AE=E0=AE=BE=E0=AE=B0=E0=AF=8D=20=E0=AE=AA?= =?UTF-8?q?=E0=AE=B4=E0=AE=A9=E0=AE=BF=E0=AE=9A=E0=AF=8D=E0=AE=9A=E0=AE=BE?= =?UTF-8?q?=E0=AE=AE=E0=AE=BF?= Date: Thu, 7 Nov 2024 04:53:23 +0530 Subject: [PATCH] Update action_execution_server.py --- openhands/runtime/action_execution_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/openhands/runtime/action_execution_server.py b/openhands/runtime/action_execution_server.py index 278d9736295a..c7df8a299ffa 100644 --- a/openhands/runtime/action_execution_server.py +++ b/openhands/runtime/action_execution_server.py @@ -258,7 +258,11 @@ async def run_ipython(self, action: IPythonRunCellAction) -> Observation: obs: Observation = ErrorObservation( "[The content in this file is absolutely correct. Also, you can't modify this test file. You must pass this test case. You should correct the codebase instead.]" ) - elif action.code == self.last_code and self.is_last_code_error: + elif ( + (os.getenv('SWE_BENCH') == '1' or 1) + and action.code == self.last_code + and self.is_last_code_error + ): obs = ErrorObservation( '[You are trying to run the same code twice. Please focus and run the correct code.]' )