SageMaker / Client / update_inference_component

update_inference_component#

SageMaker.Client.update_inference_component(**kwargs)#

Updates an inference component.

See also: AWS API Documentation

Request Syntax

response = client.update_inference_component(
    InferenceComponentName='string',
    Specification={
        'ModelName': 'string',
        'Container': {
            'Image': 'string',
            'ArtifactUrl': 'string',
            'Environment': {
                'string': 'string'
            }
        },
        'StartupParameters': {
            'ModelDataDownloadTimeoutInSeconds': 123,
            'ContainerStartupHealthCheckTimeoutInSeconds': 123
        },
        'ComputeResourceRequirements': {
            'NumberOfCpuCoresRequired': ...,
            'NumberOfAcceleratorDevicesRequired': ...,
            'MinMemoryRequiredInMb': 123,
            'MaxMemoryRequiredInMb': 123
        }
    },
    RuntimeConfig={
        'CopyCount': 123
    }
)
Parameters:
  • InferenceComponentName (string) –

    [REQUIRED]

    The name of the inference component.

  • Specification (dict) –

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

    • ModelName (string) –

      The name of an existing SageMaker model object in your account that you want to deploy with the inference component.

    • Container (dict) –

      Defines a container that provides the runtime environment for a model that you deploy with an inference component.

      • Image (string) –

        The Amazon Elastic Container Registry (Amazon ECR) path where the Docker image for the model is stored.

      • ArtifactUrl (string) –

        The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive (.tar.gz suffix).

      • Environment (dict) –

        The environment variables to set in the Docker container. Each key and value in the Environment string-to-string map can have length of up to 1024. We support up to 16 entries in the map.

        • (string) –

          • (string) –

    • StartupParameters (dict) –

      Settings that take effect while the model container starts up.

      • ModelDataDownloadTimeoutInSeconds (integer) –

        The timeout value, in seconds, to download and extract the model that you want to host from Amazon S3 to the individual inference instance associated with this inference component.

      • ContainerStartupHealthCheckTimeoutInSeconds (integer) –

        The timeout value, in seconds, for your inference container to pass health check by Amazon S3 Hosting. For more information about health check, see How Your Container Should Respond to Health Check (Ping) Requests.

    • ComputeResourceRequirements (dict) – [REQUIRED]

      The compute resources allocated to run the model assigned to the inference component.

      • NumberOfCpuCoresRequired (float) –

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

      • NumberOfAcceleratorDevicesRequired (float) –

        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.

      • MinMemoryRequiredInMb (integer) – [REQUIRED]

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

      • MaxMemoryRequiredInMb (integer) –

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

  • RuntimeConfig (dict) –

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

    • CopyCount (integer) – [REQUIRED]

      The number of runtime copies of the model container to deploy with the inference component. Each copy can serve inference requests.

Return type:

dict

Returns:

Response Syntax

{
    'InferenceComponentArn': 'string'
}

Response Structure

  • (dict) –

    • InferenceComponentArn (string) –

      The Amazon Resource Name (ARN) of the inference component.

Exceptions

  • SageMaker.Client.exceptions.ResourceLimitExceeded