InferenceComponentComputeResourceRequirementsProperty Struct
Defines the compute resources to allocate to run a model, plus any adapter models, that you assign to an inference component.
These resources include CPU cores, accelerators, and memory.
| Source | |
|---|---|
| Type last changed |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const inferenceComponentComputeResourceRequirementsProperty: sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty = {
maxMemoryRequiredInMb: 123,
minMemoryRequiredInMb: 123,
numberOfAcceleratorDevicesRequired: 123,
numberOfCpuCoresRequired: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
inference_component_compute_resource_requirements_property = sagemaker.CfnInferenceComponent.InferenceComponentComputeResourceRequirementsProperty(
max_memory_required_in_mb=123,
min_memory_required_in_mb=123,
number_of_accelerator_devices_required=123,
number_of_cpu_cores_required=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;
InferenceComponentComputeResourceRequirementsProperty inferenceComponentComputeResourceRequirementsProperty = InferenceComponentComputeResourceRequirementsProperty.builder()
.maxMemoryRequiredInMb(123)
.minMemoryRequiredInMb(123)
.numberOfAcceleratorDevicesRequired(123)
.numberOfCpuCoresRequired(123)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var inferenceComponentComputeResourceRequirementsProperty = new InferenceComponentComputeResourceRequirementsProperty {
MaxMemoryRequiredInMb = 123,
MinMemoryRequiredInMb = 123,
NumberOfAcceleratorDevicesRequired = 123,
NumberOfCpuCoresRequired = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
inferenceComponentComputeResourceRequirementsProperty := &InferenceComponentComputeResourceRequirementsProperty{
MaxMemoryRequiredInMb: jsii.Number(123),
MinMemoryRequiredInMb: jsii.Number(123),
NumberOfAcceleratorDevicesRequired: jsii.Number(123),
NumberOfCpuCoresRequired: jsii.Number(123),
}
Properties
maxMemoryRequiredInMboptionalnumbermax_memory_required_in_mboptionalint | floatmaxMemoryRequiredInMboptionalNumberMaxMemoryRequiredInMboptionaldoubleMaxMemoryRequiredInMboptional*float64 #The maximum MB of memory to allocate to run a model that you assign to an inference component.
minMemoryRequiredInMboptionalnumbermin_memory_required_in_mboptionalint | floatminMemoryRequiredInMboptionalNumberMinMemoryRequiredInMboptionaldoubleMinMemoryRequiredInMboptional*float64 #The minimum MB of memory to allocate to run a model that you assign to an inference component.
numberOfAcceleratorDevicesRequiredoptionalnumbernumber_of_accelerator_devices_requiredoptionalint | floatnumberOfAcceleratorDevicesRequiredoptionalNumberNumberOfAcceleratorDevicesRequiredoptionaldoubleNumberOfAcceleratorDevicesRequiredoptional*float64 #The number of accelerators to allocate to run a model that you assign to an inference component.
Accelerators include GPUs and AWS Inferentia.
numberOfCpuCoresRequiredoptionalnumbernumber_of_cpu_cores_requiredoptionalint | floatnumberOfCpuCoresRequiredoptionalNumberNumberOfCpuCoresRequiredoptionaldoubleNumberOfCpuCoresRequiredoptional*float64 #The number of CPU cores to allocate to run a model that you assign to an inference component.