|
@@ -1,31 +1,25 @@
|
|
|
from openhands.core.logger import openhands_logger as logger
|
|
from openhands.core.logger import openhands_logger as logger
|
|
|
from openhands.runtime.impl.e2b.sandbox import E2BBox
|
|
from openhands.runtime.impl.e2b.sandbox import E2BBox
|
|
|
|
|
+from openhands.runtime.impl.eventstream.eventstream_runtime import (
|
|
|
|
|
+ EventStreamRuntime,
|
|
|
|
|
+)
|
|
|
|
|
+from openhands.runtime.impl.modal.modal_runtime import ModalRuntime
|
|
|
|
|
+from openhands.runtime.impl.remote.remote_runtime import RemoteRuntime
|
|
|
|
|
+from openhands.runtime.impl.runloop.runloop_runtime import RunloopRuntime
|
|
|
|
|
|
|
|
|
|
|
|
|
def get_runtime_cls(name: str):
|
|
def get_runtime_cls(name: str):
|
|
|
# Local imports to avoid circular imports
|
|
# Local imports to avoid circular imports
|
|
|
if name == 'eventstream':
|
|
if name == 'eventstream':
|
|
|
- from openhands.runtime.impl.eventstream.eventstream_runtime import (
|
|
|
|
|
- EventStreamRuntime,
|
|
|
|
|
- )
|
|
|
|
|
-
|
|
|
|
|
return EventStreamRuntime
|
|
return EventStreamRuntime
|
|
|
elif name == 'e2b':
|
|
elif name == 'e2b':
|
|
|
- from openhands.runtime.impl.e2b.e2b_runtime import E2BRuntime
|
|
|
|
|
-
|
|
|
|
|
- return E2BRuntime
|
|
|
|
|
|
|
+ return E2BBox
|
|
|
elif name == 'remote':
|
|
elif name == 'remote':
|
|
|
- from openhands.runtime.impl.remote.remote_runtime import RemoteRuntime
|
|
|
|
|
-
|
|
|
|
|
return RemoteRuntime
|
|
return RemoteRuntime
|
|
|
elif name == 'modal':
|
|
elif name == 'modal':
|
|
|
logger.debug('Using ModalRuntime')
|
|
logger.debug('Using ModalRuntime')
|
|
|
- from openhands.runtime.impl.modal.modal_runtime import ModalRuntime
|
|
|
|
|
-
|
|
|
|
|
return ModalRuntime
|
|
return ModalRuntime
|
|
|
elif name == 'runloop':
|
|
elif name == 'runloop':
|
|
|
- from openhands.runtime.impl.runloop.runloop_runtime import RunloopRuntime
|
|
|
|
|
-
|
|
|
|
|
return RunloopRuntime
|
|
return RunloopRuntime
|
|
|
else:
|
|
else:
|
|
|
raise ValueError(f'Runtime {name} not supported')
|
|
raise ValueError(f'Runtime {name} not supported')
|
|
@@ -33,5 +27,9 @@ def get_runtime_cls(name: str):
|
|
|
|
|
|
|
|
__all__ = [
|
|
__all__ = [
|
|
|
'E2BBox',
|
|
'E2BBox',
|
|
|
|
|
+ 'RemoteRuntime',
|
|
|
|
|
+ 'ModalRuntime',
|
|
|
|
|
+ 'RunloopRuntime',
|
|
|
|
|
+ 'EventStreamRuntime',
|
|
|
'get_runtime_cls',
|
|
'get_runtime_cls',
|
|
|
]
|
|
]
|