yr.InvokeOptions.resource_group_options

yr.InvokeOptions.resource_group_options#

InvokeOptions.resource_group_options: ResourceGroupOptions#

Specify the ResourceGroup option, which includes resource_group_name and bundle_index.

When creating a function instance: If resource_group_name is set, it will be passed to the kernel to schedule to the specified ResourceGroup. If both resource_group_name and bundle_index are set, they are passed to the kernel to schedule the bundle to the specified ResourceGroup and index. The default value of resource_group_name is empty, and the default value of bundle_index is -1.

  • Constraints:
    • When resource_group_name is empty, the instance will not be scheduled to the specified ResourceGroup, and the bundle_index field is not effective.

    • When resource_group_name is not empty:
      • When bundle_index is -1, the instance is scheduled to the specified ResourceGroup.

      • When 0<= bundle_index < number of bundles in ResourceGroup,schedule the instance to a specified bundle in a specified ResourceGroup.

      • When bundle_index < -1 or bundle_index >= number of bundles in ResourceGroup,raise error.

  • Raises:
    • There is no ResourceGroup with the resource_group_name provided by the user.

    • The user passes a non-empty resource_group_name and bundle_index < -1.

    • When the user passes a non-empty resource_group_name and bundle_index >= the number of bundles in the ResourceGroup

    • Scheduling failed: For example, the specified ResourceGroup or the specified bundle of the specified ResourceGroup does not have enough resources to handle instance scheduling.