#[non_exhaustive]pub struct InferenceComponentComputeResourceRequirements {
pub number_of_cpu_cores_required: Option<f32>,
pub number_of_accelerator_devices_required: Option<f32>,
pub min_memory_required_in_mb: Option<i32>,
pub max_memory_required_in_mb: Option<i32>,
}
Expand description
Defines the compute resources to allocate to run a model that you assign to an inference component. These resources include CPU cores, accelerators, and memory.
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.number_of_cpu_cores_required: Option<f32>
The number of CPU cores to allocate to run a model that you assign to an inference component.
number_of_accelerator_devices_required: Option<f32>
The number of accelerators to allocate to run a model that you assign to an inference component. Accelerators include GPUs and Amazon Web Services Inferentia.
min_memory_required_in_mb: Option<i32>
The minimum MB of memory to allocate to run a model that you assign to an inference component.
max_memory_required_in_mb: Option<i32>
The maximum MB of memory to allocate to run a model that you assign to an inference component.
Implementations§
source§impl InferenceComponentComputeResourceRequirements
impl InferenceComponentComputeResourceRequirements
sourcepub fn number_of_cpu_cores_required(&self) -> Option<f32>
pub fn number_of_cpu_cores_required(&self) -> Option<f32>
The number of CPU cores to allocate to run a model that you assign to an inference component.
sourcepub fn number_of_accelerator_devices_required(&self) -> Option<f32>
pub fn number_of_accelerator_devices_required(&self) -> Option<f32>
The number of accelerators to allocate to run a model that you assign to an inference component. Accelerators include GPUs and Amazon Web Services Inferentia.
sourcepub fn min_memory_required_in_mb(&self) -> Option<i32>
pub fn min_memory_required_in_mb(&self) -> Option<i32>
The minimum MB of memory to allocate to run a model that you assign to an inference component.
sourcepub fn max_memory_required_in_mb(&self) -> Option<i32>
pub fn max_memory_required_in_mb(&self) -> Option<i32>
The maximum MB of memory to allocate to run a model that you assign to an inference component.
source§impl InferenceComponentComputeResourceRequirements
impl InferenceComponentComputeResourceRequirements
sourcepub fn builder() -> InferenceComponentComputeResourceRequirementsBuilder
pub fn builder() -> InferenceComponentComputeResourceRequirementsBuilder
Creates a new builder-style object to manufacture InferenceComponentComputeResourceRequirements
.
Trait Implementations§
source§impl Clone for InferenceComponentComputeResourceRequirements
impl Clone for InferenceComponentComputeResourceRequirements
source§fn clone(&self) -> InferenceComponentComputeResourceRequirements
fn clone(&self) -> InferenceComponentComputeResourceRequirements
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for InferenceComponentComputeResourceRequirements
impl PartialEq for InferenceComponentComputeResourceRequirements
source§fn eq(&self, other: &InferenceComponentComputeResourceRequirements) -> bool
fn eq(&self, other: &InferenceComponentComputeResourceRequirements) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for InferenceComponentComputeResourceRequirements
Auto Trait Implementations§
impl Freeze for InferenceComponentComputeResourceRequirements
impl RefUnwindSafe for InferenceComponentComputeResourceRequirements
impl Send for InferenceComponentComputeResourceRequirements
impl Sync for InferenceComponentComputeResourceRequirements
impl Unpin for InferenceComponentComputeResourceRequirements
impl UnwindSafe for InferenceComponentComputeResourceRequirements
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more