yr.ResourceGroup.wait

yr.ResourceGroup.wait#

ResourceGroup.wait(timeout_seconds: int | None = None) None[source]#

Block and wait for the result of creating a ResourceGroup.

Parameters:

timeout_seconds (Optional[int], optional) – The timeout time for blocking while waiting for the creation of a ResourceGroup result. The default value is None, which is -1 (never timeout). The value range must be an integer >= -1. If it equals -1, it will wait indefinitely.

Raises:

ValueError – Timeout is less than -1.

Examples

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