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
5421 5422 5423 5424 5425 5426 5427 5428 5429 5430 5431 5432 5433 5434 5435 5436 5437 5438 5439 5440 5441 5442 5443 5444 5445 5446 5447 5448 5449 5450 5451 5452 5453 5454 5455 5456 5457 5458 5459 5460 5461 5462 5463 5464 5465 5466 5467 5468 5469 5470 5471 5472 5473 5474 5475 5476 5477 5478 5479 5480 5481 5482 5483 5484 5485 5486 5487 5488 5489 5490 5491 5492 5493 5494 5495 5496 5497 5498 5499 | |