#[non_exhaustive]pub struct MachineSpec {
pub machine_type: String,
pub accelerator_type: AcceleratorType,
pub accelerator_count: i32,
pub tpu_topology: String,
pub reservation_affinity: Option<ReservationAffinity>,
/* private fields */
}Expand description
Specification of a single machine.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.machine_type: StringImmutable. 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: AcceleratorTypeImmutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count.
accelerator_count: i32The number of accelerators to attach to the machine.
tpu_topology: StringImmutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: “2x2x1”).
reservation_affinity: Option<ReservationAffinity>Optional. Immutable. Configuration controlling how this resource pool consumes reservation.
Implementations§
Source§impl MachineSpec
impl MachineSpec
pub fn new() -> Self
Sourcepub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
pub fn set_machine_type<T: Into<String>>(self, v: T) -> Self
Sets the value of machine_type.
Sourcepub fn set_accelerator_type<T: Into<AcceleratorType>>(self, v: T) -> Self
pub fn set_accelerator_type<T: Into<AcceleratorType>>(self, v: T) -> Self
Sets the value of accelerator_type.
Sourcepub fn set_accelerator_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_accelerator_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of accelerator_count.
Sourcepub fn set_tpu_topology<T: Into<String>>(self, v: T) -> Self
pub fn set_tpu_topology<T: Into<String>>(self, v: T) -> Self
Sets the value of tpu_topology.
Sourcepub fn set_reservation_affinity<T: Into<Option<ReservationAffinity>>>(
self,
v: T,
) -> Self
pub fn set_reservation_affinity<T: Into<Option<ReservationAffinity>>>( self, v: T, ) -> Self
Sets the value of reservation_affinity.
Trait Implementations§
Source§impl Clone for MachineSpec
impl Clone for MachineSpec
Source§fn clone(&self) -> MachineSpec
fn clone(&self) -> MachineSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more