autoscale#
Functions to assist in configuring Azure Batch autoscaling.
Functions#
|
Get an autoscaling formula that rescales pools based on the remaining task count. |
Module Contents#
- remaining_task_autoscale_formula(max_number_vms: int = 10, task_type_to_count: str = 'PendingTasks')#
Get an autoscaling formula that rescales pools based on the remaining task count. and scales down to zero when no tasks remain.
Parameters#
- max_number_vms
Maximum number of virtual machines to spin up, regardless of the number of remaining tasks. Default 10.
- task_type_to_count
Name in batch of the task type to count. See Read-only service-defined variables in the Batch docs. Default PendingTasks: the number of tasks that are either already running on a node or are ready to be picked up by an available node.
Returns#
- str
The autoscale formula, as a string.