Google Cloud Ai Platform V1 Client - Class MachineSpec (1.45.0)

Reference documentation and code samples for the Google Cloud Ai Platform V1 Client class MachineSpec.

Specification of a single machine.

Generated from protobuf message google.cloud.aiplatform.v1.MachineSpec

Namespace

Google \ Cloud \ AIPlatform \ V1

Methods

__construct

Constructor.

Parameters
Name
Description
data
array

Optional. Data for populating the Message object.

↳ machine_type
string

Immutable. The type of the machine. See the list of machine types supported for prediction See the list of machine types supported for custom training . For DeployedModel this field is optional, and the default value is n1-standard-2 . For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

↳ accelerator_type
int

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count .

↳ accelerator_count
int

The number of accelerators to attach to the machine.

↳ gpu_partition_size
string

Optional. Immutable. The Nvidia GPU partition size. When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to Nvidia GPU Partitioning for the available partition sizes. If set, the accelerator_count should be set to 1.

↳ tpu_topology
string

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

↳ reservation_affinity
ReservationAffinity

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

getMachineType

Immutable. The type of the machine.

See the list of machine types supported for prediction See the list of machine types supported for custom training . For DeployedModel this field is optional, and the default value is n1-standard-2 . For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

Returns
Type
Description
string

setMachineType

Immutable. The type of the machine.

See the list of machine types supported for prediction See the list of machine types supported for custom training . For DeployedModel this field is optional, and the default value is n1-standard-2 . For BatchPredictionJob or as part of WorkerPoolSpec this field is required.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getAcceleratorType

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count .

Returns
Type
Description
int
Enum of type AcceleratorType .

setAcceleratorType

Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count .

Parameter
Name
Description
var
int

Enum of type AcceleratorType .

Returns
Type
Description
$this

getAcceleratorCount

The number of accelerators to attach to the machine.

Returns
Type
Description
int

setAcceleratorCount

The number of accelerators to attach to the machine.

Parameter
Name
Description
var
int
Returns
Type
Description
$this

getGpuPartitionSize

Optional. Immutable. The Nvidia GPU partition size.

When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to Nvidia GPU Partitioning for the available partition sizes. If set, the accelerator_count should be set to 1.

Returns
Type
Description
string

setGpuPartitionSize

Optional. Immutable. The Nvidia GPU partition size.

When specified, the requested accelerators will be partitioned into smaller GPU partitions. For example, if the request is for 8 units of NVIDIA A100 GPUs, and gpu_partition_size="1g.10gb", the service will create 8 * 7 = 56 partitioned MIG instances. The partition size must be a value supported by the requested accelerator. Refer to Nvidia GPU Partitioning for the available partition sizes. If set, the accelerator_count should be set to 1.

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getTpuTopology

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

Returns
Type
Description
string

setTpuTopology

Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1").

Parameter
Name
Description
var
string
Returns
Type
Description
$this

getReservationAffinity

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

Returns
Type
Description

hasReservationAffinity

clearReservationAffinity

setReservationAffinity

Optional. Immutable. Configuration controlling how this resource pool consumes reservation.

Parameter
Name
Description
Returns
Type
Description
$this
Design a Mobile Site
View Site in Mobile | Classic
Share by: