Dummy
swerex.runtime.dummy.DummyRuntime
DummyRuntime(*, logger: Logger | None = None, **kwargs: Any)
Bases: AbstractRuntime
This runtime returns blank or predefined outputs. Useful for testing.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments (see |
{}
|
Source code in swerex/runtime/dummy.py
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
|
run_in_session_outputs
instance-attribute
run_in_session_outputs: list[BashObservation] | BashObservation = BashObservation(exit_code=0)
Predefine returns of run_in_session. If set to list, will pop from list, else will return the same value.
close
async
close() -> CloseResponse
Source code in swerex/runtime/dummy.py
93 94 |
|
close_session
async
close_session(request: CloseSessionRequest) -> CloseSessionResponse
Source code in swerex/runtime/dummy.py
75 76 77 78 79 |
|
create_session
async
create_session(request: CreateSessionRequest) -> CreateSessionResponse
Source code in swerex/runtime/dummy.py
60 61 62 63 64 |
|
execute
async
execute(command: Command) -> CommandResponse
Source code in swerex/runtime/dummy.py
81 82 |
|
from_config
classmethod
from_config(config: DummyRuntimeConfig) -> Self
Source code in swerex/runtime/dummy.py
53 54 55 |
|
is_alive
async
is_alive(*, timeout: float | None = None) -> IsAliveResponse
Source code in swerex/runtime/dummy.py
57 58 |
|
read_file
async
read_file(request: ReadFileRequest) -> ReadFileResponse
Source code in swerex/runtime/dummy.py
84 85 |
|
run_in_session
async
run_in_session(action: Action) -> Observation
Source code in swerex/runtime/dummy.py
66 67 68 69 70 71 72 73 |
|
upload
async
upload(request: UploadRequest) -> UploadResponse
Source code in swerex/runtime/dummy.py
90 91 |
|
write_file
async
write_file(request: WriteFileRequest) -> WriteFileResponse
Source code in swerex/runtime/dummy.py
87 88 |
|