create_inference_component
¶
create_inference_component(
*,
config_overrides: Optional[SageMakerClientConfig] = None,
inference_component_name: Optional[InferenceComponentName] = None,
endpoint_name: Optional[EndpointName] = None,
variant_name: Optional[VariantName] = None,
specification: Optional[InferenceComponentSpecification] = None,
specifications: Optional[InferenceComponentSpecificationList] = None,
runtime_config: Optional[InferenceComponentRuntimeConfig] = None,
tags: Optional[TagList] = None,
) -> CreateInferenceComponentOutput
Creates an inference component, which is a SageMaker AI 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.
Parameters:
-
inference_component_name(Optional[InferenceComponentName], default:None) –A unique name to assign to the inference component.
-
endpoint_name(Optional[EndpointName], default:None) –The name of an existing endpoint where you host the inference component.
-
variant_name(Optional[VariantName], default:None) –The name of an existing production variant where you host the inference component.
-
specification(Optional[InferenceComponentSpecification], default:None) –Details about the resources to deploy with this inference component, including the model, container, and compute resources.
-
specifications(Optional[InferenceComponentSpecificationList], default:None) –A list of specification objects for the inference component, one per instance type. Use this parameter when you want to deploy a different model or resource configuration for the inference component on each instance type. You can use either this parameter or the singular
Specificationparameter, but not both. -
runtime_config(Optional[InferenceComponentRuntimeConfig], default:None) –Runtime settings for a model that is deployed with an inference component.
-
tags(Optional[TagList], default:None) –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.
Raises:
-
ResourceLimitExceeded–You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 4903 4904 4905 4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 4935 4936 4937 4938 4939 4940 4941 4942 4943 4944 4945 4946 4947 4948 4949 4950 4951 4952 4953 4954 4955 4956 4957 4958 4959 4960 | |