create_inference_component
async
¶
create_inference_component(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = 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/async_sage_maker.py
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 4961 4962 4963 4964 4965 4966 4967 4968 4969 4970 4971 4972 4973 4974 4975 4976 4977 4978 4979 4980 4981 4982 4983 4984 4985 4986 4987 4988 4989 4990 4991 4992 4993 4994 4995 4996 4997 4998 4999 5000 5001 5002 5003 5004 5005 5006 5007 | |