yr.ResourceGroup

Contents

yr.ResourceGroup#

class yr.ResourceGroup(name:, request_id:, bundles: ~typing.List[~typing.Dict] | None = None)[source]#

Bases: object

The handle returned after creating a ResourceGroup.

Examples

>>> rg = yr.create_resource_group([{"NPU":1},{"CPU":2000,"Memory":2000}], "rgname")

Initialize ResourceGroup.

Attributes

bundle_count

Returns the number of bundles in the current resource group.

bundle_specs

Returns all bundles under the current resource group.

resource_group_name

Returns the name of the current resource group.

Methods

__init__

Initialize ResourceGroup.

wait

Block and wait for the result of creating a ResourceGroup.