ContentProperty Struct
The content of the model card.
It follows the model card json schema .
| Source | |
|---|---|
| Type last changed |
Example
ts
// 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';
declare const value: any;
const contentProperty: sagemaker.CfnModelCard.ContentProperty = {
additionalInformation: {
caveatsAndRecommendations: 'caveatsAndRecommendations',
customDetails: {
customDetailsKey: 'customDetails',
},
ethicalConsiderations: 'ethicalConsiderations',
},
businessDetails: {
businessProblem: 'businessProblem',
businessStakeholders: 'businessStakeholders',
lineOfBusiness: 'lineOfBusiness',
},
evaluationDetails: [{
name: 'name',
// the properties below are optional
datasets: ['datasets'],
evaluationJobArn: 'evaluationJobArn',
evaluationObservation: 'evaluationObservation',
metadata: {
metadataKey: 'metadata',
},
metricGroups: [{
metricData: [{
name: 'name',
type: 'type',
value: value,
// the properties below are optional
notes: 'notes',
xAxisName: ['xAxisName'],
yAxisName: ['yAxisName'],
}],
name: 'name',
}],
}],
intendedUses: {
explanationsForRiskRating: 'explanationsForRiskRating',
factorsAffectingModelEfficiency: 'factorsAffectingModelEfficiency',
intendedUses: 'intendedUses',
purposeOfModel: 'purposeOfModel',
riskRating: 'riskRating',
},
modelOverview: {
algorithmType: 'algorithmType',
inferenceEnvironment: {
containerImage: ['containerImage'],
},
modelArtifact: ['modelArtifact'],
modelCreator: 'modelCreator',
modelDescription: 'modelDescription',
modelId: 'modelId',
modelName: 'modelName',
modelOwner: 'modelOwner',
modelVersion: 123,
problemType: 'problemType',
},
modelPackageDetails: {
approvalDescription: 'approvalDescription',
createdBy: {
userProfileName: 'userProfileName',
},
domain: 'domain',
inferenceSpecification: {
containers: [{
image: 'image',
// the properties below are optional
modelDataUrl: 'modelDataUrl',
nearestModelName: 'nearestModelName',
}],
},
modelApprovalStatus: 'modelApprovalStatus',
modelPackageArn: 'modelPackageArn',
modelPackageDescription: 'modelPackageDescription',
modelPackageGroupName: 'modelPackageGroupName',
modelPackageName: 'modelPackageName',
modelPackageStatus: 'modelPackageStatus',
modelPackageVersion: 123,
sourceAlgorithms: [{
algorithmName: 'algorithmName',
// the properties below are optional
modelDataUrl: 'modelDataUrl',
}],
task: 'task',
},
trainingDetails: {
objectiveFunction: {
function: {
condition: 'condition',
facet: 'facet',
function: 'function',
},
notes: 'notes',
},
trainingJobDetails: {
hyperParameters: [{
name: 'name',
value: 'value',
}],
trainingArn: 'trainingArn',
trainingDatasets: ['trainingDatasets'],
trainingEnvironment: {
containerImage: ['containerImage'],
},
trainingMetrics: [{
name: 'name',
value: 123,
// the properties below are optional
notes: 'notes',
}],
userProvidedHyperParameters: [{
name: 'name',
value: 'value',
}],
userProvidedTrainingMetrics: [{
name: 'name',
value: 123,
// the properties below are optional
notes: 'notes',
}],
},
trainingObservations: 'trainingObservations',
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_sagemaker as sagemaker
# value: Any
content_property = sagemaker.CfnModelCard.ContentProperty(
additional_information=sagemaker.CfnModelCard.AdditionalInformationProperty(
caveats_and_recommendations="caveatsAndRecommendations",
custom_details={
"custom_details_key": "customDetails"
},
ethical_considerations="ethicalConsiderations"
),
business_details=sagemaker.CfnModelCard.BusinessDetailsProperty(
business_problem="businessProblem",
business_stakeholders="businessStakeholders",
line_of_business="lineOfBusiness"
),
evaluation_details=[sagemaker.CfnModelCard.EvaluationDetailProperty(
name="name",
# the properties below are optional
datasets=["datasets"],
evaluation_job_arn="evaluationJobArn",
evaluation_observation="evaluationObservation",
metadata={
"metadata_key": "metadata"
},
metric_groups=[sagemaker.CfnModelCard.MetricGroupProperty(
metric_data=[sagemaker.CfnModelCard.MetricDataItemsProperty(
name="name",
type="type",
value=value,
# the properties below are optional
notes="notes",
x_axis_name=["xAxisName"],
y_axis_name=["yAxisName"]
)],
name="name"
)]
)],
intended_uses=sagemaker.CfnModelCard.IntendedUsesProperty(
explanations_for_risk_rating="explanationsForRiskRating",
factors_affecting_model_efficiency="factorsAffectingModelEfficiency",
intended_uses="intendedUses",
purpose_of_model="purposeOfModel",
risk_rating="riskRating"
),
model_overview=sagemaker.CfnModelCard.ModelOverviewProperty(
algorithm_type="algorithmType",
inference_environment=sagemaker.CfnModelCard.InferenceEnvironmentProperty(
container_image=["containerImage"]
),
model_artifact=["modelArtifact"],
model_creator="modelCreator",
model_description="modelDescription",
model_id="modelId",
model_name="modelName",
model_owner="modelOwner",
model_version=123,
problem_type="problemType"
),
model_package_details=sagemaker.CfnModelCard.ModelPackageDetailsProperty(
approval_description="approvalDescription",
created_by=sagemaker.CfnModelCard.ModelPackageCreatorProperty(
user_profile_name="userProfileName"
),
domain="domain",
inference_specification=sagemaker.CfnModelCard.InferenceSpecificationProperty(
containers=[sagemaker.CfnModelCard.ContainerProperty(
image="image",
# the properties below are optional
model_data_url="modelDataUrl",
nearest_model_name="nearestModelName"
)]
),
model_approval_status="modelApprovalStatus",
model_package_arn="modelPackageArn",
model_package_description="modelPackageDescription",
model_package_group_name="modelPackageGroupName",
model_package_name="modelPackageName",
model_package_status="modelPackageStatus",
model_package_version=123,
source_algorithms=[sagemaker.CfnModelCard.SourceAlgorithmProperty(
algorithm_name="algorithmName",
# the properties below are optional
model_data_url="modelDataUrl"
)],
task="task"
),
training_details=sagemaker.CfnModelCard.TrainingDetailsProperty(
objective_function=sagemaker.CfnModelCard.ObjectiveFunctionProperty(
function=sagemaker.CfnModelCard.FunctionProperty(
condition="condition",
facet="facet",
function="function"
),
notes="notes"
),
training_job_details=sagemaker.CfnModelCard.TrainingJobDetailsProperty(
hyper_parameters=[sagemaker.CfnModelCard.TrainingHyperParameterProperty(
name="name",
value="value"
)],
training_arn="trainingArn",
training_datasets=["trainingDatasets"],
training_environment=sagemaker.CfnModelCard.TrainingEnvironmentProperty(
container_image=["containerImage"]
),
training_metrics=[sagemaker.CfnModelCard.TrainingMetricProperty(
name="name",
value=123,
# the properties below are optional
notes="notes"
)],
user_provided_hyper_parameters=[sagemaker.CfnModelCard.TrainingHyperParameterProperty(
name="name",
value="value"
)],
user_provided_training_metrics=[sagemaker.CfnModelCard.TrainingMetricProperty(
name="name",
value=123,
# the properties below are optional
notes="notes"
)]
),
training_observations="trainingObservations"
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.sagemaker.*;
Object value;
ContentProperty contentProperty = ContentProperty.builder()
.additionalInformation(AdditionalInformationProperty.builder()
.caveatsAndRecommendations("caveatsAndRecommendations")
.customDetails(Map.of(
"customDetailsKey", "customDetails"))
.ethicalConsiderations("ethicalConsiderations")
.build())
.businessDetails(BusinessDetailsProperty.builder()
.businessProblem("businessProblem")
.businessStakeholders("businessStakeholders")
.lineOfBusiness("lineOfBusiness")
.build())
.evaluationDetails(List.of(EvaluationDetailProperty.builder()
.name("name")
// the properties below are optional
.datasets(List.of("datasets"))
.evaluationJobArn("evaluationJobArn")
.evaluationObservation("evaluationObservation")
.metadata(Map.of(
"metadataKey", "metadata"))
.metricGroups(List.of(MetricGroupProperty.builder()
.metricData(List.of(MetricDataItemsProperty.builder()
.name("name")
.type("type")
.value(value)
// the properties below are optional
.notes("notes")
.xAxisName(List.of("xAxisName"))
.yAxisName(List.of("yAxisName"))
.build()))
.name("name")
.build()))
.build()))
.intendedUses(IntendedUsesProperty.builder()
.explanationsForRiskRating("explanationsForRiskRating")
.factorsAffectingModelEfficiency("factorsAffectingModelEfficiency")
.intendedUses("intendedUses")
.purposeOfModel("purposeOfModel")
.riskRating("riskRating")
.build())
.modelOverview(ModelOverviewProperty.builder()
.algorithmType("algorithmType")
.inferenceEnvironment(InferenceEnvironmentProperty.builder()
.containerImage(List.of("containerImage"))
.build())
.modelArtifact(List.of("modelArtifact"))
.modelCreator("modelCreator")
.modelDescription("modelDescription")
.modelId("modelId")
.modelName("modelName")
.modelOwner("modelOwner")
.modelVersion(123)
.problemType("problemType")
.build())
.modelPackageDetails(ModelPackageDetailsProperty.builder()
.approvalDescription("approvalDescription")
.createdBy(ModelPackageCreatorProperty.builder()
.userProfileName("userProfileName")
.build())
.domain("domain")
.inferenceSpecification(InferenceSpecificationProperty.builder()
.containers(List.of(ContainerProperty.builder()
.image("image")
// the properties below are optional
.modelDataUrl("modelDataUrl")
.nearestModelName("nearestModelName")
.build()))
.build())
.modelApprovalStatus("modelApprovalStatus")
.modelPackageArn("modelPackageArn")
.modelPackageDescription("modelPackageDescription")
.modelPackageGroupName("modelPackageGroupName")
.modelPackageName("modelPackageName")
.modelPackageStatus("modelPackageStatus")
.modelPackageVersion(123)
.sourceAlgorithms(List.of(SourceAlgorithmProperty.builder()
.algorithmName("algorithmName")
// the properties below are optional
.modelDataUrl("modelDataUrl")
.build()))
.task("task")
.build())
.trainingDetails(TrainingDetailsProperty.builder()
.objectiveFunction(ObjectiveFunctionProperty.builder()
.function(FunctionProperty.builder()
.condition("condition")
.facet("facet")
.function("function")
.build())
.notes("notes")
.build())
.trainingJobDetails(TrainingJobDetailsProperty.builder()
.hyperParameters(List.of(TrainingHyperParameterProperty.builder()
.name("name")
.value("value")
.build()))
.trainingArn("trainingArn")
.trainingDatasets(List.of("trainingDatasets"))
.trainingEnvironment(TrainingEnvironmentProperty.builder()
.containerImage(List.of("containerImage"))
.build())
.trainingMetrics(List.of(TrainingMetricProperty.builder()
.name("name")
.value(123)
// the properties below are optional
.notes("notes")
.build()))
.userProvidedHyperParameters(List.of(TrainingHyperParameterProperty.builder()
.name("name")
.value("value")
.build()))
.userProvidedTrainingMetrics(List.of(TrainingMetricProperty.builder()
.name("name")
.value(123)
// the properties below are optional
.notes("notes")
.build()))
.build())
.trainingObservations("trainingObservations")
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// 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 value;
var contentProperty = new ContentProperty {
AdditionalInformation = new AdditionalInformationProperty {
CaveatsAndRecommendations = "caveatsAndRecommendations",
CustomDetails = new Dictionary<string, string> {
{ "customDetailsKey", "customDetails" }
},
EthicalConsiderations = "ethicalConsiderations"
},
BusinessDetails = new BusinessDetailsProperty {
BusinessProblem = "businessProblem",
BusinessStakeholders = "businessStakeholders",
LineOfBusiness = "lineOfBusiness"
},
EvaluationDetails = new [] { new EvaluationDetailProperty {
Name = "name",
// the properties below are optional
Datasets = new [] { "datasets" },
EvaluationJobArn = "evaluationJobArn",
EvaluationObservation = "evaluationObservation",
Metadata = new Dictionary<string, string> {
{ "metadataKey", "metadata" }
},
MetricGroups = new [] { new MetricGroupProperty {
MetricData = new [] { new MetricDataItemsProperty {
Name = "name",
Type = "type",
Value = value,
// the properties below are optional
Notes = "notes",
XAxisName = new [] { "xAxisName" },
YAxisName = new [] { "yAxisName" }
} },
Name = "name"
} }
} },
IntendedUses = new IntendedUsesProperty {
ExplanationsForRiskRating = "explanationsForRiskRating",
FactorsAffectingModelEfficiency = "factorsAffectingModelEfficiency",
IntendedUses = "intendedUses",
PurposeOfModel = "purposeOfModel",
RiskRating = "riskRating"
},
ModelOverview = new ModelOverviewProperty {
AlgorithmType = "algorithmType",
InferenceEnvironment = new InferenceEnvironmentProperty {
ContainerImage = new [] { "containerImage" }
},
ModelArtifact = new [] { "modelArtifact" },
ModelCreator = "modelCreator",
ModelDescription = "modelDescription",
ModelId = "modelId",
ModelName = "modelName",
ModelOwner = "modelOwner",
ModelVersion = 123,
ProblemType = "problemType"
},
ModelPackageDetails = new ModelPackageDetailsProperty {
ApprovalDescription = "approvalDescription",
CreatedBy = new ModelPackageCreatorProperty {
UserProfileName = "userProfileName"
},
Domain = "domain",
InferenceSpecification = new InferenceSpecificationProperty {
Containers = new [] { new ContainerProperty {
Image = "image",
// the properties below are optional
ModelDataUrl = "modelDataUrl",
NearestModelName = "nearestModelName"
} }
},
ModelApprovalStatus = "modelApprovalStatus",
ModelPackageArn = "modelPackageArn",
ModelPackageDescription = "modelPackageDescription",
ModelPackageGroupName = "modelPackageGroupName",
ModelPackageName = "modelPackageName",
ModelPackageStatus = "modelPackageStatus",
ModelPackageVersion = 123,
SourceAlgorithms = new [] { new SourceAlgorithmProperty {
AlgorithmName = "algorithmName",
// the properties below are optional
ModelDataUrl = "modelDataUrl"
} },
Task = "task"
},
TrainingDetails = new TrainingDetailsProperty {
ObjectiveFunction = new ObjectiveFunctionProperty {
Function = new FunctionProperty {
Condition = "condition",
Facet = "facet",
Function = "function"
},
Notes = "notes"
},
TrainingJobDetails = new TrainingJobDetailsProperty {
HyperParameters = new [] { new TrainingHyperParameterProperty {
Name = "name",
Value = "value"
} },
TrainingArn = "trainingArn",
TrainingDatasets = new [] { "trainingDatasets" },
TrainingEnvironment = new TrainingEnvironmentProperty {
ContainerImage = new [] { "containerImage" }
},
TrainingMetrics = new [] { new TrainingMetricProperty {
Name = "name",
Value = 123,
// the properties below are optional
Notes = "notes"
} },
UserProvidedHyperParameters = new [] { new TrainingHyperParameterProperty {
Name = "name",
Value = "value"
} },
UserProvidedTrainingMetrics = new [] { new TrainingMetricProperty {
Name = "name",
Value = 123,
// the properties below are optional
Notes = "notes"
} }
},
TrainingObservations = "trainingObservations"
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
var value interface{}
contentProperty := &ContentProperty{
AdditionalInformation: &AdditionalInformationProperty{
CaveatsAndRecommendations: jsii.String("caveatsAndRecommendations"),
CustomDetails: map[string]*string{
"customDetailsKey": jsii.String("customDetails"),
},
EthicalConsiderations: jsii.String("ethicalConsiderations"),
},
BusinessDetails: &BusinessDetailsProperty{
BusinessProblem: jsii.String("businessProblem"),
BusinessStakeholders: jsii.String("businessStakeholders"),
LineOfBusiness: jsii.String("lineOfBusiness"),
},
EvaluationDetails: []interface{}{
&EvaluationDetailProperty{
Name: jsii.String("name"),
// the properties below are optional
Datasets: []*string{
jsii.String("datasets"),
},
EvaluationJobArn: jsii.String("evaluationJobArn"),
EvaluationObservation: jsii.String("evaluationObservation"),
Metadata: map[string]*string{
"metadataKey": jsii.String("metadata"),
},
MetricGroups: []interface{}{
&MetricGroupProperty{
MetricData: []interface{}{
&MetricDataItemsProperty{
Name: jsii.String("name"),
Type: jsii.String("type"),
Value: value,
// the properties below are optional
Notes: jsii.String("notes"),
XAxisName: []*string{
jsii.String("xAxisName"),
},
YAxisName: []*string{
jsii.String("yAxisName"),
},
},
},
Name: jsii.String("name"),
},
},
},
},
IntendedUses: &IntendedUsesProperty{
ExplanationsForRiskRating: jsii.String("explanationsForRiskRating"),
FactorsAffectingModelEfficiency: jsii.String("factorsAffectingModelEfficiency"),
IntendedUses: jsii.String("intendedUses"),
PurposeOfModel: jsii.String("purposeOfModel"),
RiskRating: jsii.String("riskRating"),
},
ModelOverview: &ModelOverviewProperty{
AlgorithmType: jsii.String("algorithmType"),
InferenceEnvironment: &InferenceEnvironmentProperty{
ContainerImage: []*string{
jsii.String("containerImage"),
},
},
ModelArtifact: []*string{
jsii.String("modelArtifact"),
},
ModelCreator: jsii.String("modelCreator"),
ModelDescription: jsii.String("modelDescription"),
ModelId: jsii.String("modelId"),
ModelName: jsii.String("modelName"),
ModelOwner: jsii.String("modelOwner"),
ModelVersion: jsii.Number(123),
ProblemType: jsii.String("problemType"),
},
ModelPackageDetails: &ModelPackageDetailsProperty{
ApprovalDescription: jsii.String("approvalDescription"),
CreatedBy: &ModelPackageCreatorProperty{
UserProfileName: jsii.String("userProfileName"),
},
Domain: jsii.String("domain"),
InferenceSpecification: &InferenceSpecificationProperty{
Containers: []interface{}{
&ContainerProperty{
Image: jsii.String("image"),
// the properties below are optional
ModelDataUrl: jsii.String("modelDataUrl"),
NearestModelName: jsii.String("nearestModelName"),
},
},
},
ModelApprovalStatus: jsii.String("modelApprovalStatus"),
ModelPackageArn: jsii.String("modelPackageArn"),
ModelPackageDescription: jsii.String("modelPackageDescription"),
ModelPackageGroupName: jsii.String("modelPackageGroupName"),
ModelPackageName: jsii.String("modelPackageName"),
ModelPackageStatus: jsii.String("modelPackageStatus"),
ModelPackageVersion: jsii.Number(123),
SourceAlgorithms: []interface{}{
&SourceAlgorithmProperty{
AlgorithmName: jsii.String("algorithmName"),
// the properties below are optional
ModelDataUrl: jsii.String("modelDataUrl"),
},
},
Task: jsii.String("task"),
},
TrainingDetails: &TrainingDetailsProperty{
ObjectiveFunction: &ObjectiveFunctionProperty{
Function: &FunctionProperty{
Condition: jsii.String("condition"),
Facet: jsii.String("facet"),
Function: jsii.String("function"),
},
Notes: jsii.String("notes"),
},
TrainingJobDetails: &TrainingJobDetailsProperty{
HyperParameters: []interface{}{
&TrainingHyperParameterProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
TrainingArn: jsii.String("trainingArn"),
TrainingDatasets: []*string{
jsii.String("trainingDatasets"),
},
TrainingEnvironment: &TrainingEnvironmentProperty{
ContainerImage: []*string{
jsii.String("containerImage"),
},
},
TrainingMetrics: []interface{}{
&TrainingMetricProperty{
Name: jsii.String("name"),
Value: jsii.Number(123),
// the properties below are optional
Notes: jsii.String("notes"),
},
},
UserProvidedHyperParameters: []interface{}{
&TrainingHyperParameterProperty{
Name: jsii.String("name"),
Value: jsii.String("value"),
},
},
UserProvidedTrainingMetrics: []interface{}{
&TrainingMetricProperty{
Name: jsii.String("name"),
Value: jsii.Number(123),
// the properties below are optional
Notes: jsii.String("notes"),
},
},
},
TrainingObservations: jsii.String("trainingObservations"),
},
}
Properties
additionalInformationoptionalIResolvable | CfnModelCard.additional_informationoptionaltyping.Union[IResolvable, AdditionalInformationProperty]additionalInformationoptionalIResolvableAdditionalInformationoptionalIResolvableAdditionalInformationoptionalinterface{} #Additional information about the model.
businessDetailsoptionalIResolvable | CfnModelCard.business_detailsoptionaltyping.Union[IResolvable, BusinessDetailsProperty]businessDetailsoptionalIResolvableBusinessDetailsoptionalIResolvableBusinessDetailsoptionalinterface{} #Information about how the model supports business goals.
evaluationDetailsoptionalIResolvable | IResolvable | CfnModelCard.evaluation_detailsoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, EvaluationDetailProperty]]]evaluationDetailsoptionalIResolvableEvaluationDetailsoptionalIResolvableEvaluationDetailsoptionalinterface{} #An overview about the model's evaluation.
intendedUsesoptionalIResolvable | CfnModelCard.intended_usesoptionaltyping.Union[IResolvable, IntendedUsesProperty]intendedUsesoptionalIResolvableIntendedUsesoptionalIResolvableIntendedUsesoptionalinterface{} #The intended usage of the model.
modelOverviewoptionalIResolvable | CfnModelCard.model_overviewoptionaltyping.Union[IResolvable, ModelOverviewProperty]modelOverviewoptionalIResolvableModelOverviewoptionalIResolvableModelOverviewoptionalinterface{} #An overview about the model.
modelPackageDetailsoptionalIResolvable | CfnModelCard.model_package_detailsoptionaltyping.Union[IResolvable, ModelPackageDetailsProperty]modelPackageDetailsoptionalIResolvableModelPackageDetailsoptionalIResolvableModelPackageDetailsoptionalinterface{} #Metadata information related to model package version.
trainingDetailsoptionalIResolvable | CfnModelCard.training_detailsoptionaltyping.Union[IResolvable, TrainingDetailsProperty]trainingDetailsoptionalIResolvableTrainingDetailsoptionalIResolvableTrainingDetailsoptionalinterface{} #An overview about model training.