#[non_exhaustive]pub struct ResourcePool {
pub id: String,
pub machine_spec: Option<MachineSpec>,
pub replica_count: Option<i64>,
pub disk_spec: Option<DiskSpec>,
pub used_replica_count: i64,
pub autoscaling_spec: Option<AutoscalingSpec>,
/* private fields */
}Expand description
Represents the spec of a group of resources of the same type, for example machine type, disk, and accelerators, in a PersistentResource.
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.id: StringImmutable. The unique ID in a PersistentResource for referring to this resource pool. User can specify it if necessary. Otherwise, it’s generated automatically.
machine_spec: Option<MachineSpec>Required. Immutable. The specification of a single machine.
replica_count: Option<i64>Optional. The total number of machines to use for this resource pool.
disk_spec: Option<DiskSpec>Optional. Disk spec for the machine in this node pool.
used_replica_count: i64Output only. The number of machines currently in use by training jobs for this resource pool. Will replace idle_replica_count.
autoscaling_spec: Option<AutoscalingSpec>Optional. Optional spec to configure GKE or Ray-on-Vertex autoscaling
Implementations§
Source§impl ResourcePool
impl ResourcePool
pub fn new() -> Self
Sourcepub fn set_machine_spec<T: Into<Option<MachineSpec>>>(self, v: T) -> Self
pub fn set_machine_spec<T: Into<Option<MachineSpec>>>(self, v: T) -> Self
Sets the value of machine_spec.
Sourcepub fn set_replica_count<T: Into<Option<i64>>>(self, v: T) -> Self
pub fn set_replica_count<T: Into<Option<i64>>>(self, v: T) -> Self
Sets the value of replica_count.
Sourcepub fn set_disk_spec<T: Into<Option<DiskSpec>>>(self, v: T) -> Self
pub fn set_disk_spec<T: Into<Option<DiskSpec>>>(self, v: T) -> Self
Sets the value of disk_spec.
Sourcepub fn set_used_replica_count<T: Into<i64>>(self, v: T) -> Self
pub fn set_used_replica_count<T: Into<i64>>(self, v: T) -> Self
Sets the value of used_replica_count.
Sourcepub fn set_autoscaling_spec<T: Into<Option<AutoscalingSpec>>>(
self,
v: T,
) -> Self
pub fn set_autoscaling_spec<T: Into<Option<AutoscalingSpec>>>( self, v: T, ) -> Self
Sets the value of autoscaling_spec.
Trait Implementations§
Source§impl Clone for ResourcePool
impl Clone for ResourcePool
Source§fn clone(&self) -> ResourcePool
fn clone(&self) -> ResourcePool
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more