Use reservations
To ensure that VM resources are available when your Colab Enterprise runtimes need them, you can use Compute Engine reservations. Reservations provide a high level of assurance in obtaining capacity for Compute Engine zonal resources.
Overview
To use a reservation with Colab Enterprise, you perform the following tasks:
Use the reservation by running code on a runtime derived from your runtime template.
Limitations and requirements
All limitations of Compute Engine reservations apply when Colab Enterprise runtimes consume reservations. See How reservations work.
In addition, when using reservations with Colab Enterprise, the following limitations and requirements apply:
Reservations for Colab Enterprise is in private preview. To request access, see the access request page.
Committed use discounts don't apply.
Your reservation must be in the same project as your Colab Enterprise notebook and runtime.
Your reservation's machine type must match the machine type of your runtime template.
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Dataform, and Compute Engine APIs.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
-
Make sure that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI, Dataform, and Compute Engine APIs.
Required roles
To ensure that your user account has the necessary permissions to use reservations with Colab Enterprise, ask your administrator to grant your user account the following IAM roles on the project:
-
Colab Enterprise User (
roles/aiplatform.colabEnterpriseUser
) -
Compute Admin (
roles/compute.admin
)
For more information about granting roles, see Manage access to projects, folders, and organizations.
Your administrator might also be able to give your user account the required permissions through custom roles or other predefined roles.
Create a reservation
Create a Compute Engine reservation. It can be a single-project reservation or a shared reservation. For more information, see the following documents:
The reservation can include GPU accelerators.
Add your reservation to a new runtime template
To create a runtime template that uses your reservation, do the following:-
In the Google Cloud console, go to the Colab Enterprise Runtime Templates page.
-
Click
New template.The Create new runtime template dialog appears.
-
In the Runtime basics section, enter a Display name.
-
In the Region menu, select the region where you want your runtime template.
-
In the Configure compute section, in the Machine type menu, select a machine type. The runtime template's machine type must match your reservation's machine type.
-
In the Reservations menu, select the specific reservation that you want to use or select Use automatically selected reservations.
For more information about consuming automatically selected or specifically targeted reservations, see the Consumption type section of How reservations work.
-
Complete the rest of the dialog, and then click Create.
Your runtime template appears in the list on the Runtime templates tab.
Use your reservation
To use your reservation, do the following:
Create a runtime from your new runtime template.
Open or create a notebook.
In your notebook, connect to the runtime, and run code.
Stop using your reservation
To stop using your reservation, you can delete your reservation.
If you want to continue using your reservation with other resources, but don't want your Colab Enterprise notebooks to use it, delete the runtime and runtime template that are associated with your reservation.
Billing
Reserved Compute Engine VM resources are billed by Colab Enterprise while the Colab Enterprise runtime is running, and are billed by Compute Engine when the VM resources aren't being used by Colab Enterprise.
Troubleshoot
This section shows you how to resolve issues when using reservations with Colab Enterprise.
Unable to create a runtime
An error similar to the following occurs when you try to create a runtime.
Failed to create notebook runtime with error: Invalid value for field 'resource.reservationAffinity': '{"consumeReservationType": "SPECIFIC_ALLOCATION", "key": "compute.googleapis.com/reservation-name...'. No available resources in specified reservations.
This error occurs when the machine types of your runtime template and reservation don't match.
To resolve this issue, create a runtime template with a machine type that matches the reservation's machine type.
What's next
To grant a principal access to your runtime template, see Manage access to a runtime template.
To learn more about Compute Engine reservations, see Reservations of Compute Engine zonal resources.