Skip to content

InferenceComponentComputeResourceRequirements

Source code in docs_src/capo_sagemaker/types/inference_component_compute_resource_requirements.py
class InferenceComponentComputeResourceRequirements(TypedDict, closed=True):
    number_of_cpu_cores_required: NotRequired[
        "capo_sagemaker.types.number_of_cpu_cores.NumberOfCpuCores"
    ]
    """<p>The number of CPU cores to allocate to run a model that you assign to an inference component.</p>"""
    number_of_accelerator_devices_required: NotRequired[
        "capo_sagemaker.types.number_of_accelerator_devices.NumberOfAcceleratorDevices"
    ]
    """<p>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.</p>"""
    min_memory_required_in_mb: NotRequired[
        "capo_sagemaker.types.memory_in_mb.MemoryInMb"
    ]
    """<p>The minimum MB of memory to allocate to run a model that you assign to an inference component.</p>"""
    max_memory_required_in_mb: NotRequired[
        "capo_sagemaker.types.memory_in_mb.MemoryInMb"
    ]
    """<p>The maximum MB of memory to allocate to run a model that you assign to an inference component.</p>"""
    accelerator_partition_type: NotRequired[
        "capo_sagemaker.types.accelerator_partition_type.AcceleratorPartitionType"
    ]
    """<p>The accelerator partition profile this inference component occupies; on NVIDIA GPUs this is a Multi-Instance GPU (MIG) profile such as <code>mig-3g.40gb</code>. It must be one of the partition profiles declared in the target endpoint's accelerator partition layout, and when set, <code>NumberOfAcceleratorDevicesRequired</code> must be <code>1</code>. This field is required when the endpoint's production variant has an accelerator partition layout. For endpoints without a layout, omit this field to place the inference component on a whole accelerator.</p>"""

accelerator_partition_type instance-attribute

accelerator_partition_type: NotRequired[AcceleratorPartitionType]

The accelerator partition profile this inference component occupies; on NVIDIA GPUs this is a Multi-Instance GPU (MIG) profile such as mig-3g.40gb. It must be one of the partition profiles declared in the target endpoint's accelerator partition layout, and when set, NumberOfAcceleratorDevicesRequired must be 1. This field is required when the endpoint's production variant has an accelerator partition layout. For endpoints without a layout, omit this field to place the inference component on a whole accelerator.

max_memory_required_in_mb instance-attribute

max_memory_required_in_mb: NotRequired[MemoryInMb]

The maximum MB of memory to allocate to run a model that you assign to an inference component.

min_memory_required_in_mb instance-attribute

min_memory_required_in_mb: NotRequired[MemoryInMb]

The minimum MB of memory to allocate to run a model that you assign to an inference component.

number_of_accelerator_devices_required instance-attribute

number_of_accelerator_devices_required: NotRequired[NumberOfAcceleratorDevices]

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.

number_of_cpu_cores_required instance-attribute

number_of_cpu_cores_required: NotRequired[NumberOfCpuCores]

The number of CPU cores to allocate to run a model that you assign to an inference component.