Bases: AbstractDeployment
This deployment returns blank or predefined outputs.
Useful for testing.
Parameters:
Name |
Type |
Description |
Default |
**kwargs
|
Any
|
Keyword arguments (see DummyDeploymentConfig for details).
|
{}
|
Source code in swerex/deployment/dummy.py
15
16
17
18
19
20
21
22
23
24
25 | def __init__(self, *, logger: logging.Logger | None = None, **kwargs: Any):
"""This deployment returns blank or predefined outputs.
Useful for testing.
Args:
**kwargs: Keyword arguments (see `DummyDeploymentConfig` for details).
"""
self._config = DummyDeploymentConfig(**kwargs)
self.logger = logger or get_logger("rex-deploy")
self._runtime = DummyRuntime(logger=self.logger) # type: ignore
self._hooks = CombinedDeploymentHook()
|
logger
instance-attribute
logger = logger or get_logger('rex-deploy')
runtime
property
writable
add_hook
add_hook(hook: DeploymentHook)
Source code in swerex/deployment/dummy.py
| def add_hook(self, hook: DeploymentHook):
self._hooks.add_hook(hook)
|
from_config
classmethod
Source code in swerex/deployment/dummy.py
| @classmethod
def from_config(cls, config: DummyDeploymentConfig) -> Self:
return cls(**config.model_dump())
|
is_alive
async
Source code in swerex/deployment/dummy.py
| async def is_alive(self, *, timeout: float | None = None) -> IsAliveResponse:
return IsAliveResponse(is_alive=True)
|
start
async
Source code in swerex/deployment/dummy.py
| async def start(self):
pass
|
stop
async
Source code in swerex/deployment/dummy.py
| async def stop(self):
pass
|