class ModelData
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.Sagemaker.Alpha.ModelData |
Go | github.com/aws/aws-cdk-go/awscdksagemakeralpha/v2#ModelData |
Java | software.amazon.awscdk.services.sagemaker.alpha.ModelData |
Python | aws_cdk.aws_sagemaker_alpha.ModelData |
TypeScript (source) | @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.

.NET
Go
Java
Python
TypeScript (