Remote
swerex.deployment.remote.RemoteDeployment
RemoteDeployment(*, logger: Logger | None = None, **kwargs: Any)
Bases: AbstractDeployment
This deployment is only a thin wrapper around the RemoteRuntime
.
Use this if you have deployed a runtime somewhere else but want to interact with it
through the AbstractDeployment
interface.
For example, if you have an agent that you usually use with a DocerkDeployment
interface,
you sometimes might want to manually start a docker container for debugging purposes.
Then you can use this deployment to explicitly connect to your manually started runtime.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
**kwargs
|
Any
|
Keyword arguments (see |
{}
|
Source code in swerex/deployment/remote.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
runtime
property
runtime: RemoteRuntime
Returns the runtime if running.
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
add_hook
add_hook(hook: DeploymentHook)
Source code in swerex/deployment/remote.py
32 33 |
|
from_config
classmethod
from_config(config: RemoteDeploymentConfig) -> Self
Source code in swerex/deployment/remote.py
35 36 37 |
|
is_alive
async
is_alive() -> IsAliveResponse
Checks if the runtime is alive. The return value can be tested with bool().
Raises:
Type | Description |
---|---|
DeploymentNotStartedError
|
If the deployment was not started. |
Source code in swerex/deployment/remote.py
50 51 52 53 54 55 56 57 |
|
start
async
start()
Starts the runtime.
Source code in swerex/deployment/remote.py
59 60 61 62 63 64 65 66 67 68 |
|
stop
async
stop()
Stops the runtime.
Source code in swerex/deployment/remote.py
70 71 72 73 |
|