class ModelData
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.Sagemaker.Alpha.ModelData |
![]() | github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#ModelData |
![]() | software.amazon.awscdk.services.sagemaker.alpha.ModelData |
![]() | aws_cdk.aws_sagemaker_alpha.ModelData |
![]() | @aws-cdk/aws-sagemaker-alpha ยป ModelData |
Model data represents the source of model artifacts, which will ultimately be loaded from an S3 location.
Example
import * as sagemaker from '@aws-cdk/aws-sagemaker-alpha';
declare const image: sagemaker.ContainerImage;
declare const modelData: sagemaker.ModelData;
const model = new sagemaker.Model(this, 'ContainerModel', {
containers: [
{
image,
modelData,
}
],
networkIsolation: true,
});
Initializer
new ModelData()
Methods
Name | Description |
---|---|
bind(scope, model) | This method is invoked by the SageMaker Model construct when it needs to resolve the model data to a URI. |
static from | Constructs model data that will be uploaded to S3 as part of the CDK app deployment. |
static from | Constructs model data which is already available within S3. |
bind(scope, model)
public bind(scope: Construct, model: IModel): ModelDataConfig
Parameters
- scope
Construct
โ The scope within which the model data is resolved. - model
IModel
โ The Model construct performing the URI resolution.
Returns
This method is invoked by the SageMaker Model construct when it needs to resolve the model data to a URI.
static fromAsset(path, options?)
public static fromAsset(path: string, options?: AssetOptions): ModelData
Parameters
- path
string
โ The local path to a model artifact file as a gzipped tar file. - options
Asset
โ The options to further configure the selected asset.Options
Returns
Constructs model data that will be uploaded to S3 as part of the CDK app deployment.
static fromBucket(bucket, objectKey)
public static fromBucket(bucket: IBucket, objectKey: string): ModelData
Parameters
- bucket
IBucket
โ The S3 bucket within which the model artifacts are stored. - objectKey
string
โ The S3 object key at which the model artifacts are stored.
Returns
Constructs model data which is already available within S3.