Class CfnModelPackageProps
Properties for defining a CfnModelPackage
.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.Sagemaker
Assembly: Amazon.CDK.AWS.Sagemaker.dll
Syntax (csharp)
public class CfnModelPackageProps : Object, ICfnModelPackageProps
Syntax (vb)
Public Class CfnModelPackageProps
Inherits Object
Implements ICfnModelPackageProps
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Sagemaker;
var modelInput;
var cfnModelPackageProps = new CfnModelPackageProps {
AdditionalInferenceSpecificationDefinition = new AdditionalInferenceSpecificationDefinitionProperty {
Containers = new [] { new ModelPackageContainerDefinitionProperty {
Image = "image",
// the properties below are optional
ContainerHostname = "containerHostname",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Framework = "framework",
FrameworkVersion = "frameworkVersion",
ImageDigest = "imageDigest",
ModelDataUrl = "modelDataUrl",
ModelInput = modelInput,
NearestModelName = "nearestModelName",
ProductId = "productId"
} },
Name = "name",
// the properties below are optional
Description = "description",
SupportedContentTypes = new [] { "supportedContentTypes" },
SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
},
AdditionalInferenceSpecifications = new [] { new AdditionalInferenceSpecificationDefinitionProperty {
Containers = new [] { new ModelPackageContainerDefinitionProperty {
Image = "image",
// the properties below are optional
ContainerHostname = "containerHostname",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Framework = "framework",
FrameworkVersion = "frameworkVersion",
ImageDigest = "imageDigest",
ModelDataUrl = "modelDataUrl",
ModelInput = modelInput,
NearestModelName = "nearestModelName",
ProductId = "productId"
} },
Name = "name",
// the properties below are optional
Description = "description",
SupportedContentTypes = new [] { "supportedContentTypes" },
SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
} },
AdditionalInferenceSpecificationsToAdd = new [] { new AdditionalInferenceSpecificationDefinitionProperty {
Containers = new [] { new ModelPackageContainerDefinitionProperty {
Image = "image",
// the properties below are optional
ContainerHostname = "containerHostname",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Framework = "framework",
FrameworkVersion = "frameworkVersion",
ImageDigest = "imageDigest",
ModelDataUrl = "modelDataUrl",
ModelInput = modelInput,
NearestModelName = "nearestModelName",
ProductId = "productId"
} },
Name = "name",
// the properties below are optional
Description = "description",
SupportedContentTypes = new [] { "supportedContentTypes" },
SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
} },
ApprovalDescription = "approvalDescription",
CertifyForMarketplace = false,
ClientToken = "clientToken",
CreatedBy = new UserContextProperty {
DomainId = "domainId",
UserProfileArn = "userProfileArn",
UserProfileName = "userProfileName"
},
CustomerMetadataProperties = new Dictionary<string, string> {
{ "customerMetadataPropertiesKey", "customerMetadataProperties" }
},
Domain = "domain",
DriftCheckBaselines = new DriftCheckBaselinesProperty {
Bias = new DriftCheckBiasProperty {
ConfigFile = new FileSourceProperty {
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest",
ContentType = "contentType"
},
PostTrainingConstraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
PreTrainingConstraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
Explainability = new DriftCheckExplainabilityProperty {
ConfigFile = new FileSourceProperty {
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest",
ContentType = "contentType"
},
Constraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
ModelDataQuality = new DriftCheckModelDataQualityProperty {
Constraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
Statistics = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
ModelQuality = new DriftCheckModelQualityProperty {
Constraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
Statistics = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
}
},
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
InferenceSpecification = new InferenceSpecificationProperty {
Containers = new [] { new ModelPackageContainerDefinitionProperty {
Image = "image",
// the properties below are optional
ContainerHostname = "containerHostname",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
Framework = "framework",
FrameworkVersion = "frameworkVersion",
ImageDigest = "imageDigest",
ModelDataUrl = "modelDataUrl",
ModelInput = modelInput,
NearestModelName = "nearestModelName",
ProductId = "productId"
} },
SupportedContentTypes = new [] { "supportedContentTypes" },
SupportedResponseMimeTypes = new [] { "supportedResponseMimeTypes" },
// the properties below are optional
SupportedRealtimeInferenceInstanceTypes = new [] { "supportedRealtimeInferenceInstanceTypes" },
SupportedTransformInstanceTypes = new [] { "supportedTransformInstanceTypes" }
},
LastModifiedBy = new UserContextProperty {
DomainId = "domainId",
UserProfileArn = "userProfileArn",
UserProfileName = "userProfileName"
},
LastModifiedTime = "lastModifiedTime",
MetadataProperties = new MetadataPropertiesProperty {
CommitId = "commitId",
GeneratedBy = "generatedBy",
ProjectId = "projectId",
Repository = "repository"
},
ModelApprovalStatus = "modelApprovalStatus",
ModelMetrics = new ModelMetricsProperty {
Bias = new BiasProperty {
PostTrainingReport = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
PreTrainingReport = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
Report = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
Explainability = new ExplainabilityProperty {
Report = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
ModelDataQuality = new ModelDataQualityProperty {
Constraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
Statistics = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
},
ModelQuality = new ModelQualityProperty {
Constraints = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
},
Statistics = new MetricsSourceProperty {
ContentType = "contentType",
S3Uri = "s3Uri",
// the properties below are optional
ContentDigest = "contentDigest"
}
}
},
ModelPackageDescription = "modelPackageDescription",
ModelPackageGroupName = "modelPackageGroupName",
ModelPackageName = "modelPackageName",
ModelPackageStatusDetails = new ModelPackageStatusDetailsProperty {
ValidationStatuses = new [] { new ModelPackageStatusItemProperty {
Name = "name",
Status = "status",
// the properties below are optional
FailureReason = "failureReason"
} },
// the properties below are optional
ImageScanStatuses = new [] { new ModelPackageStatusItemProperty {
Name = "name",
Status = "status",
// the properties below are optional
FailureReason = "failureReason"
} }
},
ModelPackageStatusItem = new ModelPackageStatusItemProperty {
Name = "name",
Status = "status",
// the properties below are optional
FailureReason = "failureReason"
},
ModelPackageVersion = 123,
SamplePayloadUrl = "samplePayloadUrl",
SourceAlgorithmSpecification = new SourceAlgorithmSpecificationProperty {
SourceAlgorithms = new [] { new SourceAlgorithmProperty {
AlgorithmName = "algorithmName",
// the properties below are optional
ModelDataUrl = "modelDataUrl"
} }
},
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
Task = "task",
ValidationSpecification = new ValidationSpecificationProperty {
ValidationProfiles = new [] { new ValidationProfileProperty {
ProfileName = "profileName",
TransformJobDefinition = new TransformJobDefinitionProperty {
TransformInput = new TransformInputProperty {
DataSource = new DataSourceProperty {
S3DataSource = new S3DataSourceProperty {
S3DataType = "s3DataType",
S3Uri = "s3Uri"
}
},
// the properties below are optional
CompressionType = "compressionType",
ContentType = "contentType",
SplitType = "splitType"
},
TransformOutput = new TransformOutputProperty {
S3OutputPath = "s3OutputPath",
// the properties below are optional
Accept = "accept",
AssembleWith = "assembleWith",
KmsKeyId = "kmsKeyId"
},
TransformResources = new TransformResourcesProperty {
InstanceCount = 123,
InstanceType = "instanceType",
// the properties below are optional
VolumeKmsKeyId = "volumeKmsKeyId"
},
// the properties below are optional
BatchStrategy = "batchStrategy",
Environment = new Dictionary<string, string> {
{ "environmentKey", "environment" }
},
MaxConcurrentTransforms = 123,
MaxPayloadInMb = 123
}
} },
ValidationRole = "validationRole"
}
};
Synopsis
Constructors
CfnModelPackageProps() |
Properties
AdditionalInferenceSpecificationDefinition | A structure of additional Inference Specification. |
AdditionalInferenceSpecifications | An array of additional Inference Specification objects. |
AdditionalInferenceSpecificationsToAdd | An array of additional Inference Specification objects to be added to the existing array. |
ApprovalDescription | A description provided when the model approval is set. |
CertifyForMarketplace | Whether the model package is to be certified to be listed on AWS Marketplace. |
ClientToken | A unique token that guarantees that the call to this API is idempotent. |
CreatedBy | Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. |
CustomerMetadataProperties | The metadata properties for the model package. |
Domain | The machine learning domain of your model package and its components. |
DriftCheckBaselines | Represents the drift check baselines that can be used when the model monitor is set using the model package. |
Environment | The environment variables to set in the Docker container. |
InferenceSpecification | Defines how to perform inference generation after a training job is run. |
LastModifiedBy | Information about the user who created or modified an experiment, trial, trial component, lineage group, or project. |
LastModifiedTime | The last time the model package was modified. |
MetadataProperties | Metadata properties of the tracking entity, trial, or trial component. |
ModelApprovalStatus | The approval status of the model. This can be one of the following values. |
ModelMetrics | Metrics for the model. |
ModelPackageDescription | The description of the model package. |
ModelPackageGroupName | The model group to which the model belongs. |
ModelPackageName | The name of the model. |
ModelPackageStatusDetails | Specifies the validation and image scan statuses of the model package. |
ModelPackageStatusItem | Represents the overall status of a model package. |
ModelPackageVersion | The version number of a versioned model. |
SamplePayloadUrl | The Amazon Simple Storage Service path where the sample payload are stored. |
SourceAlgorithmSpecification | A list of algorithms that were used to create a model package. |
Tags | A list of the tags associated with the model package. |
Task | The machine learning task your model package accomplishes. |
ValidationSpecification | Specifies batch transform jobs that SageMaker runs to validate your model package. |
Constructors
CfnModelPackageProps()
public CfnModelPackageProps()
Properties
AdditionalInferenceSpecificationDefinition
A structure of additional Inference Specification.
public object AdditionalInferenceSpecificationDefinition { get; set; }
Property Value
System.Object
Remarks
Additional Inference Specification specifies details about inference jobs that can be run with models based on this model package
AdditionalInferenceSpecifications
An array of additional Inference Specification objects.
public object AdditionalInferenceSpecifications { get; set; }
Property Value
System.Object
Remarks
AdditionalInferenceSpecificationsToAdd
An array of additional Inference Specification objects to be added to the existing array.
public object AdditionalInferenceSpecificationsToAdd { get; set; }
Property Value
System.Object
Remarks
The total number of additional Inference Specification objects cannot exceed 15. Each additional Inference Specification object specifies artifacts based on this model package that can be used on inference endpoints. Generally used with SageMaker Neo to store the compiled artifacts.
ApprovalDescription
A description provided when the model approval is set.
public string ApprovalDescription { get; set; }
Property Value
System.String
Remarks
CertifyForMarketplace
Whether the model package is to be certified to be listed on AWS Marketplace.
public object CertifyForMarketplace { get; set; }
Property Value
System.Object
Remarks
For information about listing model packages on AWS Marketplace, see List Your Algorithm or Model Package on AWS Marketplace .
ClientToken
A unique token that guarantees that the call to this API is idempotent.
public string ClientToken { get; set; }
Property Value
System.String
Remarks
CreatedBy
Information about the user who created or modified an experiment, trial, trial component, lineage group, or project.
public object CreatedBy { get; set; }
Property Value
System.Object
Remarks
CustomerMetadataProperties
The metadata properties for the model package.
public object CustomerMetadataProperties { get; set; }
Property Value
System.Object
Remarks
Domain
The machine learning domain of your model package and its components.
public string Domain { get; set; }
Property Value
System.String
Remarks
Common machine learning domains include computer vision and natural language processing.
DriftCheckBaselines
Represents the drift check baselines that can be used when the model monitor is set using the model package.
public object DriftCheckBaselines { get; set; }
Property Value
System.Object
Remarks
Environment
The environment variables to set in the Docker container.
public object Environment { get; set; }
Property Value
System.Object
Remarks
Each key and value in the Environment
string to string map can have length of up to 1024. We support up to 16 entries in the map.
InferenceSpecification
Defines how to perform inference generation after a training job is run.
public object InferenceSpecification { get; set; }
Property Value
System.Object
Remarks
LastModifiedBy
Information about the user who created or modified an experiment, trial, trial component, lineage group, or project.
public object LastModifiedBy { get; set; }
Property Value
System.Object
Remarks
LastModifiedTime
The last time the model package was modified.
public string LastModifiedTime { get; set; }
Property Value
System.String
Remarks
MetadataProperties
Metadata properties of the tracking entity, trial, or trial component.
public object MetadataProperties { get; set; }
Property Value
System.Object
Remarks
ModelApprovalStatus
The approval status of the model. This can be one of the following values.
public string ModelApprovalStatus { get; set; }
Property Value
System.String
Remarks
ModelMetrics
Metrics for the model.
public object ModelMetrics { get; set; }
Property Value
System.Object
Remarks
ModelPackageDescription
The description of the model package.
public string ModelPackageDescription { get; set; }
Property Value
System.String
Remarks
ModelPackageGroupName
The model group to which the model belongs.
public string ModelPackageGroupName { get; set; }
Property Value
System.String
Remarks
ModelPackageName
The name of the model.
public string ModelPackageName { get; set; }
Property Value
System.String
Remarks
ModelPackageStatusDetails
Specifies the validation and image scan statuses of the model package.
public object ModelPackageStatusDetails { get; set; }
Property Value
System.Object
Remarks
ModelPackageStatusItem
Represents the overall status of a model package.
public object ModelPackageStatusItem { get; set; }
Property Value
System.Object
Remarks
ModelPackageVersion
The version number of a versioned model.
public Nullable<double> ModelPackageVersion { get; set; }
Property Value
System.Nullable<System.Double>
Remarks
SamplePayloadUrl
The Amazon Simple Storage Service path where the sample payload are stored.
public string SamplePayloadUrl { get; set; }
Property Value
System.String
Remarks
This path must point to a single gzip compressed tar archive (.tar.gz suffix).
SourceAlgorithmSpecification
A list of algorithms that were used to create a model package.
public object SourceAlgorithmSpecification { get; set; }
Property Value
System.Object
Remarks
Tags
A list of the tags associated with the model package.
public ICfnTag[] Tags { get; set; }
Property Value
ICfnTag[]
Remarks
For more information, see Tagging AWS resources in the AWS General Reference Guide .
Task
The machine learning task your model package accomplishes.
public string Task { get; set; }
Property Value
System.String
Remarks
Common machine learning tasks include object detection and image classification.
ValidationSpecification
Specifies batch transform jobs that SageMaker runs to validate your model package.
public object ValidationSpecification { get; set; }
Property Value
System.Object