Skip to content

Create Inference Component

sagemaker_create_inference_component R Documentation

Creates an inference component, which is a SageMaker hosting object that you can use to deploy a model to an endpoint

Description

Creates an inference component, which is a SageMaker hosting object that you can use to deploy a model to an endpoint. In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.

Usage

sagemaker_create_inference_component(InferenceComponentName,
  EndpointName, VariantName, Specification, RuntimeConfig, Tags)

Arguments

InferenceComponentName

[required] A unique name to assign to the inference component.

EndpointName

[required] The name of an existing endpoint where you host the inference component.

VariantName

[required] The name of an existing production variant where you host the inference component.

Specification

[required] Details about the resources to deploy with this inference component, including the model, container, and compute resources.

RuntimeConfig

[required] Runtime settings for a model that is deployed with an inference component.

Tags

A list of key-value pairs associated with the model. For more information, see Tagging Amazon Web Services resources in the Amazon Web Services General Reference.

Value

A list with the following syntax:

list(
  InferenceComponentArn = "string"
)

Request syntax

svc$create_inference_component(
  InferenceComponentName = "string",
  EndpointName = "string",
  VariantName = "string",
  Specification = list(
    ModelName = "string",
    Container = list(
      Image = "string",
      ArtifactUrl = "string",
      Environment = list(
        "string"
      )
    ),
    StartupParameters = list(
      ModelDataDownloadTimeoutInSeconds = 123,
      ContainerStartupHealthCheckTimeoutInSeconds = 123
    ),
    ComputeResourceRequirements = list(
      NumberOfCpuCoresRequired = 123.0,
      NumberOfAcceleratorDevicesRequired = 123.0,
      MinMemoryRequiredInMb = 123,
      MaxMemoryRequiredInMb = 123
    )
  ),
  RuntimeConfig = list(
    CopyCount = 123
  ),
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)