Scaling Group Functions

class ai.backend.client.scaling_group.ScalingGroup(name)[source]

Provides getting scaling-group information required for the current user.

The scaling-group is an opaque server-side configuration which splits the whole cluster into several partitions, so that server administrators can apply different auto-scaling policies and operation standards to each partition of agent sets.

session = None

The client session instance that this function class is bound to.

classmethod await list_available(group)[source]

List available scaling groups for the current user, considering the user, the user’s domain, and the designated user group.

classmethod await list(fields=None)[source]

List available scaling groups for the current user, considering the user, the user’s domain, and the designated user group.

Return type

Sequence[dict]

classmethod await detail(name, fields=None)[source]

Fetch information of a scaling group by name.

Parameters
  • name (str) – Name of the scaling group.

  • fields (Optional[Iterable[str]]) – Additional per-scaling-group query fields.

Return type

Sequence[dict]

classmethod await create(name, description='', is_active=True, driver=None, driver_opts=None, scheduler=None, scheduler_opts=None, fields=None)[source]

Creates a new scaling group with the given options.

Return type

dict

classmethod await update(name, description='', is_active=True, driver=None, driver_opts=None, scheduler=None, scheduler_opts=None, fields=None)[source]

Update existing scaling group.

Return type

dict

classmethod await delete(name)[source]

Deletes an existing scaling group.

classmethod await associate_domain(scaling_group, domain)[source]

Associate scaling_group with domain.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • domain (str) – The name of a domain.

classmethod await dissociate_domain(scaling_group, domain)[source]

Dissociate scaling_group from domain.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • domain (str) – The name of a domain.

classmethod await dissociate_all_domain(domain)[source]

Dissociate all scaling_groups from domain.

Parameters

domain (str) – The name of a domain.

classmethod await associate_group(scaling_group, group_id)[source]

Associate scaling_group with group.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • group_id (str) – The ID of a group.

classmethod await dissociate_group(scaling_group, group_id)[source]

Dissociate scaling_group from group.

Parameters
  • scaling_group (str) – The name of a scaling group.

  • group_id (str) – The ID of a group.

classmethod await dissociate_all_group(group_id)[source]

Dissociate all scaling_groups from group.

Parameters

group_id (str) – The ID of a group.