[Refactor] split runtime initialization (create, connect, init) in cli scripts (#7036)

This commit is contained in:
Engel Nyst
2025-03-03 00:19:25 +01:00
committed by GitHub
parent 91ad59dc24
commit 395c1ea9e3
26 changed files with 107 additions and 21 deletions

View File

@@ -35,6 +35,7 @@ from openhands.events.action import (
)
from openhands.events.observation import CmdOutputObservation
from openhands.runtime.base import Runtime
from openhands.utils.async_utils import call_async_from_sync
def codeact_user_response_mint(state: State, task: Task, task_config: dict[str, int]):
@@ -184,6 +185,7 @@ def process_instance(
)
runtime = create_runtime(config)
call_async_from_sync(runtime.connect)
initialize_runtime(runtime)
state: State | None = asyncio.run(