InferenceComponentSpecificationProperty Struct
Details about the resources to deploy with this inference component, including the model, container, and compute resources.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_sagemaker as sagemaker } from 'aws-cdk-lib';
const inferenceComponentSpecificationProperty: sagemaker.CfnInferenceComponent.InferenceComponentSpecificationProperty = {
baseInferenceComponentName: 'baseInferenceComponentName',
computeResourceRequirements: {
maxMemoryRequiredInMb: 123,
minMemoryRequiredInMb: 123,
numberOfAcceleratorDevicesRequired: 123,
numberOfCpuCoresRequired: 123,
},
container: {
artifactUrl: 'artifactUrl',
containerMetricsConfig: {
metricsEndpoints: [{
metricsEndpointPath: 'metricsEndpointPath',
// the properties below are optional
metricPublishFrequencyInSeconds: 123,
}],
},
deployedImage: {
resolutionTime: 'resolutionTime',
resolvedImage: 'resolvedImage',
specifiedImage: 'specifiedImage',
},
environment: {
environmentKey: 'environment',
},
image: 'image',
},
currentDataCacheConfig: {
enableCaching: false,
},
dataCacheConfig: {
enableCaching: false,
},
modelName: 'modelName',
schedulingConfig: {
availabilityZoneBalance: {
enforcementMode: 'enforcementMode',
// the properties below are optional
maxImbalance: 123,
},
placementStrategy: 'placementStrategy',
},
startupParameters: {
containerStartupHealthCheckTimeoutInSeconds: 123,
modelDataDownloadTimeoutInSeconds: 123,
},
};
Properties
baseInferenceComponentNameoptionalstringbase_inference_component_nameoptionalstrbaseInferenceComponentNameoptionalStringBaseInferenceComponentNameoptionalstringBaseInferenceComponentNameoptional*string#notes
Specify this parameter only if your request is meant to create an adapter inference component. An adapter inference component contains the path to an adapter model. The purpose of the adapter model is to tailor the inference output of a base foundation model, which is hosted by the base inference component. The adapter inference component uses the compute resources that you assigned to the base inference component.
When you create an adapter inference component, use the Container parameter to specify the location of the adapter artifacts. In the parameter value, use the ArtifactUrl parameter of the InferenceComponentContainerSpecification data type.
Before you can create an adapter inference component, you must have an existing inference component that contains the foundation model that you want to adapt.
computeResourceRequirementsoptionalIResolvable | CfnInferenceComponent.InferenceComponentComputeResourceRequirementsPropertycompute_resource_requirementsoptionaltyping.Union[IResolvable, InferenceComponentComputeResourceRequirementsProperty]computeResourceRequirementsoptionalIResolvableComputeResourceRequirementsoptionalIResolvableComputeResourceRequirementsoptionalinterface{}#Omit this parameter if your request is meant to create an adapter inference component. An adapter inference component is loaded by a base inference component, and it uses the compute resources of the base inference component.
containeroptionalIResolvable | CfnInferenceComponent.InferenceComponentContainerSpecificationPropertycontaineroptionaltyping.Union[IResolvable, InferenceComponentContainerSpecificationProperty]containeroptionalIResolvableContaineroptionalIResolvableContaineroptionalinterface{}#currentDataCacheConfigoptionalIResolvable | CfnInferenceComponent.InferenceComponentDataCacheConfigPropertycurrent_data_cache_configoptionaltyping.Union[IResolvable, InferenceComponentDataCacheConfigProperty]currentDataCacheConfigoptionalIResolvableCurrentDataCacheConfigoptionalIResolvableCurrentDataCacheConfigoptionalinterface{}#dataCacheConfigoptionalIResolvable | CfnInferenceComponent.InferenceComponentDataCacheConfigPropertydata_cache_configoptionaltyping.Union[IResolvable, InferenceComponentDataCacheConfigProperty]dataCacheConfigoptionalIResolvableDataCacheConfigoptionalIResolvableDataCacheConfigoptionalinterface{}#modelNameoptionalstringmodel_nameoptionalstrmodelNameoptionalStringModelNameoptionalstringModelNameoptional*string#schedulingConfigoptionalIResolvable | CfnInferenceComponent.InferenceComponentSchedulingConfigPropertyscheduling_configoptionaltyping.Union[IResolvable, InferenceComponentSchedulingConfigProperty]schedulingConfigoptionalIResolvableSchedulingConfigoptionalIResolvableSchedulingConfigoptionalinterface{}#startupParametersoptionalIResolvable | CfnInferenceComponent.InferenceComponentStartupParametersPropertystartup_parametersoptionaltyping.Union[IResolvable, InferenceComponentStartupParametersProperty]startupParametersoptionalIResolvableStartupParametersoptionalIResolvableStartupParametersoptionalinterface{}#