wallaroo.deployment_config


class DeploymentConfig(typing.Dict):
def guarantee_workspace_id( self, workspace_id: Union[int, NoneType]) -> wallaroo.deployment_config.DeploymentConfig:
Inherited Members
builtins.dict
get
setdefault
pop
popitem
keys
items
values
update
fromkeys
clear
copy
class DeploymentConfigBuilder:
DeploymentConfigBuilder(workspace_id: Union[int, NoneType] = None)
def replica_count(self, count: int) -> wallaroo.deployment_config.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 disable_autoscale(self):

Disables autoscaling in the deployment configuration

def cpus( self, core_count: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def deployment_label(self, label: str) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def gpus( self, gpu_count: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def memory( self, memory_spec: str) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def lb_cpus( self, core_count: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def lb_memory( self, memory_spec: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def python_load_timeout_secs( self, timeout_secs: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:
def sidekick_gpus( self, model_version: wallaroo.model_version.ModelVersion, gpu_count: int) -> wallaroo.deployment_config.DeploymentConfigBuilder:

Sets the number of GPUs to be used for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.

Parameters
  • ModelVersion model_version: The sidekick model to configure.
  • int core_count: Number of GPUs to use in this sidekick.
Returns

This DeploymentConfigBuilder instance for chaining.

def sidekick_cpus( self, model_version: wallaroo.model_version.ModelVersion, 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
  • ModelVersion model_version: 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_version: wallaroo.model_version.ModelVersion, 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
  • ModelVersion model_version: 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_version: wallaroo.model_version.ModelVersion, 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
  • ModelVersion model_version: 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.

Sets the machine architecture for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.

Parameters
  • model_version: ModelVersion: The sidekick model to configure.
  • arch: Optional[Architecture]: Machine architecture for this sidekick.
Returns

This DeploymentConfigBuilder instance for chaining.

def sidekick_accel( self, model_version: wallaroo.model_version.ModelVersion, accel: Union[wallaroo.engine_config.Acceleration, NoneType] = None) -> wallaroo.deployment_config.DeploymentConfigBuilder:

Sets the acceleration option for the model's sidekick container. Only affects image-based models (e.g. MLFlow models) in a deployment.

Parameters
  • model_version: ModelVersion: The sidekick model to configure.
  • accel: Optional[Acceleration]: Acceleration option for this sidekick.
Returns

This DeploymentConfigBuilder instance for chaining.