-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
21 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,35 @@ | ||
from openhands.core.logger import openhands_logger as logger | ||
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): | ||
# Local imports to avoid circular imports | ||
if name == 'eventstream': | ||
from openhands.runtime.impl.eventstream.eventstream_runtime import ( | ||
EventStreamRuntime, | ||
) | ||
|
||
return EventStreamRuntime | ||
elif name == 'e2b': | ||
from openhands.runtime.impl.e2b.e2b_runtime import E2BRuntime | ||
|
||
return E2BRuntime | ||
return E2BBox | ||
elif name == 'remote': | ||
from openhands.runtime.impl.remote.remote_runtime import RemoteRuntime | ||
|
||
return RemoteRuntime | ||
elif name == 'modal': | ||
logger.debug('Using ModalRuntime') | ||
from openhands.runtime.impl.modal.modal_runtime import ModalRuntime | ||
|
||
return ModalRuntime | ||
elif name == 'runloop': | ||
from openhands.runtime.impl.runloop.runloop_runtime import RunloopRuntime | ||
|
||
return RunloopRuntime | ||
else: | ||
raise ValueError(f'Runtime {name} not supported') | ||
|
||
|
||
__all__ = [ | ||
'E2BBox', | ||
'RemoteRuntime', | ||
'ModalRuntime', | ||
'RunloopRuntime', | ||
'EventStreamRuntime', | ||
'get_runtime_cls', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters