wallaroo.deployment_config
class
DeploymentConfig(typing.Dict):
def
guarantee_workspace_id( self, workspace_id: Optional[int]) -> wallaroo.deployment_config.DeploymentConfig:
Inherited Members
- builtins.dict
- get
- setdefault
- pop
- popitem
- keys
- items
- values
- update
- fromkeys
- clear
- copy
class
DeploymentConfigBuilder:
def
replica_autoscale_min_max(self, maximum: int, minimum: int = 0):
Configures the minimum and maximum for autoscaling
def
autoscale_cpu_utilization(self, cpu_utilization_percentage: int):
Sets the average CPU metric to scale on in a percentage
def
python_load_timeout_secs( self, timeout_secs: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def
sidekick_cpus( self, model: wallaroo.model.Model, core_count: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
Sets the number of CPUs to be used for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.
Parameters
- Model model: The sidekick model to configure.
- int core_count: Number of CPU cores to use in this sidekick.
Returns
This DeploymentConfigBuilder instance for chaining.
def
sidekick_memory( self, model: wallaroo.model.Model, memory_spec: str) -> wallaroo.deployment_config.DeploymentConfigBuilder:
Sets the memory to be used for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.
Parameters
- Model model: The sidekick model to configure.
- str memory_spec: Specification of amount of memory (e.g., "2Gi", "500Mi") to use in this sidekick.
Returns
This DeploymentConfigBuilder instance for chaining.
def
sidekick_env( self, model: wallaroo.model.Model, environment: Dict[str, str]) -> wallaroo.deployment_config.DeploymentConfigBuilder:
Sets the environment variables to be set for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.
Parameters
- Model model: The sidekick model to configure.
- Dict[str, str] environment: Dictionary of environment variables names and their corresponding values to be set in the sidekick container.
Returns
This DeploymentConfigBuilder instance for chaining.