Skip to main content
A machine type is a catalog resource that defines the compute shape of an agent VM. Each environment references one machine type by name via machine_type_ref. The platform provides built-in machine types for common VM shapes on GCP and AWS. Built-in machine types are immutable — they cannot be modified or deleted.

Fields

GCE spec fields

Set spec.gce for GCP machine types:

AWS spec fields

Set spec.aws for AWS machine types:

GPU support

A GPU reaches an agent VM through the machine type itself. On GCE, that is an accelerator-optimized machine type — the a2, a3, a4, a4x, g2, and g4 series each include a fixed GPU model and count, so machine_type: a2-highgpu-1g with has_gpu: true provisions the GPUs that machine type comes with. On AWS, an EC2 GPU instance type such as g5.2xlarge works the same way. Nothing attaches a GPU to a GCE machine type that lacks one, so on GCE has_gpu and the machine type must agree:
  • has_gpu: true requires an accelerator-optimized spec.gce.machine_type. On any other machine type it claims a GPU the VM would not have, and is rejected.
  • An accelerator-optimized spec.gce.machine_type requires has_gpu: true (with gpu_kind), so the machine type describes the GPUs its VMs get.
  • spec.gce.accelerator_type and spec.gce.accelerator_count request accelerators attached separately to an ordinary machine type. That is not yet supported: setting either is rejected.
A rejected declaration fails the write, and an environment referencing a machine type stored with one fails VM creation with UNSUPPORTED_GPU_SHAPE.

Region configuration

Each entry in a regions map is a RegionConfig object:

Examples

Listing machine types

Reading a single machine type

GCE machine type

GCE GPU machine type

An accelerator-optimized machine type includes its GPUs, so no accelerator fields are set:

AWS machine type

Creating a machine type

Errors