CfnModelCard

class aws_cdk.aws_sagemaker.CfnModelCard(scope, id, *, content, model_card_name, model_card_status, created_by=None, last_modified_by=None, security_config=None, tags=None)

Bases: CfnResource

Creates an Amazon SageMaker Model Card.

For information about how to use model cards, see Amazon SageMaker Model Card .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-modelcard.html

CloudformationResource:

AWS::SageMaker::ModelCard

ExampleMetadata:

fixture=_generated

Example:

# 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

cfn_model_card = sagemaker.CfnModelCard(self, "MyCfnModelCard",
    content=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"
        )
    ),
    model_card_name="modelCardName",
    model_card_status="modelCardStatus",

    # the properties below are optional
    created_by=sagemaker.CfnModelCard.UserContextProperty(
        domain_id="domainId",
        user_profile_arn="userProfileArn",
        user_profile_name="userProfileName"
    ),
    last_modified_by=sagemaker.CfnModelCard.UserContextProperty(
        domain_id="domainId",
        user_profile_arn="userProfileArn",
        user_profile_name="userProfileName"
    ),
    security_config=sagemaker.CfnModelCard.SecurityConfigProperty(
        kms_key_id="kmsKeyId"
    ),
    tags=[CfnTag(
        key="key",
        value="value"
    )]
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • content (Union[IResolvable, ContentProperty, Dict[str, Any]]) – The content of the model card. Content uses the model card JSON schema .

  • model_card_name (str) – The unique name of the model card.

  • model_card_status (str) – The approval status of the model card within your organization. Different organizations might have different criteria for model card review and approval. - Draft : The model card is a work in progress. - PendingReview : The model card is pending review. - Approved : The model card is approved. - Archived : The model card is archived. No more updates should be made to the model card, but it can still be exported.

  • created_by (Union[IResolvable, UserContextProperty, Dict[str, Any], None]) – Information about the user who created or modified one or more of the following:. - Experiment - Trial - Trial component - Lineage group - Project - Model Card

  • last_modified_by (Union[IResolvable, UserContextProperty, Dict[str, Any], None]) – Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.

  • security_config (Union[IResolvable, SecurityConfigProperty, Dict[str, Any], None]) – The security configuration used to protect model card data.

  • tags (Optional[Sequence[Union[CfnTag, Dict[str, Any]]]]) – Key-value pairs used to manage metadata for the model card.

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you’ve removed it from the CDK application or because you’ve made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::SageMaker::ModelCard'
attr_created_by_domain_id

The domain associated with the user.

CloudformationAttribute:

CreatedBy.DomainId

attr_created_by_user_profile_arn

The Amazon Resource Name (ARN) of the user’s profile.

CloudformationAttribute:

CreatedBy.UserProfileArn

attr_created_by_user_profile_name

The name of the user’s profile.

CloudformationAttribute:

CreatedBy.UserProfileName

attr_creation_time

The date and time the model card was created.

CloudformationAttribute:

CreationTime

attr_last_modified_by_domain_id

The domain associated with the user.

CloudformationAttribute:

LastModifiedBy.DomainId

attr_last_modified_by_user_profile_arn

The Amazon Resource Name (ARN) of the user’s profile.

CloudformationAttribute:

LastModifiedBy.UserProfileArn

attr_last_modified_by_user_profile_name

The name of the user’s profile.

CloudformationAttribute:

LastModifiedBy.UserProfileName

attr_last_modified_time

The date and time the model card was last modified.

CloudformationAttribute:

LastModifiedTime

attr_model_card_arn

The Amazon Resource Number (ARN) of the model card.

For example, arn:aws:sagemaker:us-west-2:012345678901:modelcard/examplemodelcard .

CloudformationAttribute:

ModelCardArn

attr_model_card_processing_status

The processing status of model card deletion.

The ModelCardProcessingStatus updates throughout the different deletion steps.

CloudformationAttribute:

ModelCardProcessingStatus

attr_model_card_version

A version of the model card.

CloudformationAttribute:

ModelCardVersion

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

content

The content of the model card.

created_by

.

Type:

Information about the user who created or modified one or more of the following

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

last_modified_by

Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

model_card_name

The unique name of the model card.

model_card_status

The approval status of the model card within your organization.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

security_config

The security configuration used to protect model card data.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

tags

Tag Manager which manages the tags for this resource.

tags_raw

Key-value pairs used to manage metadata for the model card.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

AdditionalInformationProperty

class CfnModelCard.AdditionalInformationProperty(*, caveats_and_recommendations=None, custom_details=None, ethical_considerations=None)

Bases: object

Additional information about the model.

Parameters:
  • caveats_and_recommendations (Optional[str]) – Caveats and recommendations for those who might use this model in their applications.

  • custom_details (Union[IResolvable, Mapping[str, str], None]) – Any additional information to document about the model.

  • ethical_considerations (Optional[str]) – Any ethical considerations documented by the model card author.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-additionalinformation.html

ExampleMetadata:

fixture=_generated

Example:

# 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

additional_information_property = sagemaker.CfnModelCard.AdditionalInformationProperty(
    caveats_and_recommendations="caveatsAndRecommendations",
    custom_details={
        "custom_details_key": "customDetails"
    },
    ethical_considerations="ethicalConsiderations"
)

Attributes

caveats_and_recommendations

Caveats and recommendations for those who might use this model in their applications.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-additionalinformation.html#cfn-sagemaker-modelcard-additionalinformation-caveatsandrecommendations

custom_details

Any additional information to document about the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-additionalinformation.html#cfn-sagemaker-modelcard-additionalinformation-customdetails

ethical_considerations

Any ethical considerations documented by the model card author.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-additionalinformation.html#cfn-sagemaker-modelcard-additionalinformation-ethicalconsiderations

BusinessDetailsProperty

class CfnModelCard.BusinessDetailsProperty(*, business_problem=None, business_stakeholders=None, line_of_business=None)

Bases: object

Information about how the model supports business goals.

Parameters:
  • business_problem (Optional[str]) – The specific business problem that the model is trying to solve.

  • business_stakeholders (Optional[str]) – The relevant stakeholders for the model.

  • line_of_business (Optional[str]) – The broader business need that the model is serving.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-businessdetails.html

ExampleMetadata:

fixture=_generated

Example:

# 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

business_details_property = sagemaker.CfnModelCard.BusinessDetailsProperty(
    business_problem="businessProblem",
    business_stakeholders="businessStakeholders",
    line_of_business="lineOfBusiness"
)

Attributes

business_problem

The specific business problem that the model is trying to solve.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-businessdetails.html#cfn-sagemaker-modelcard-businessdetails-businessproblem

business_stakeholders

The relevant stakeholders for the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-businessdetails.html#cfn-sagemaker-modelcard-businessdetails-businessstakeholders

line_of_business

The broader business need that the model is serving.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-businessdetails.html#cfn-sagemaker-modelcard-businessdetails-lineofbusiness

ContainerProperty

class CfnModelCard.ContainerProperty(*, image, model_data_url=None, nearest_model_name=None)

Bases: object

Parameters:
  • image (str) – Inference environment path. The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.

  • model_data_url (Optional[str]) – The Amazon S3 path where the model artifacts, which result from model training, are stored.

  • nearest_model_name (Optional[str]) – The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-container.html

ExampleMetadata:

fixture=_generated

Example:

# 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

container_property = sagemaker.CfnModelCard.ContainerProperty(
    image="image",

    # the properties below are optional
    model_data_url="modelDataUrl",
    nearest_model_name="nearestModelName"
)

Attributes

image

Inference environment path.

The Amazon EC2 Container Registry (Amazon ECR) path where inference code is stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-container.html#cfn-sagemaker-modelcard-container-image

model_data_url

The Amazon S3 path where the model artifacts, which result from model training, are stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-container.html#cfn-sagemaker-modelcard-container-modeldataurl

nearest_model_name

The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-container.html#cfn-sagemaker-modelcard-container-nearestmodelname

ContentProperty

class CfnModelCard.ContentProperty(*, additional_information=None, business_details=None, evaluation_details=None, intended_uses=None, model_overview=None, model_package_details=None, training_details=None)

Bases: object

The content of the model card.

It follows the model card json schema .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html

ExampleMetadata:

fixture=_generated

Example:

# 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"
    )
)

Attributes

additional_information

Additional information about the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-additionalinformation

business_details

Information about how the model supports business goals.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-businessdetails

evaluation_details

An overview about the model’s evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-evaluationdetails

intended_uses

The intended usage of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-intendeduses

model_overview

An overview about the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-modeloverview

model_package_details

Metadata information related to model package version.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-modelpackagedetails

training_details

An overview about model training.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-content.html#cfn-sagemaker-modelcard-content-trainingdetails

EvaluationDetailProperty

class CfnModelCard.EvaluationDetailProperty(*, name, datasets=None, evaluation_job_arn=None, evaluation_observation=None, metadata=None, metric_groups=None)

Bases: object

The evaluation details of the model.

Parameters:
  • name (str) – The evaluation job name.

  • datasets (Optional[Sequence[str]]) – The location of the datasets used to evaluate the model.

  • evaluation_job_arn (Optional[str]) – The Amazon Resource Name (ARN) of the evaluation job.

  • evaluation_observation (Optional[str]) – Any observations made during the model evaluation.

  • metadata (Union[IResolvable, Mapping[str, str], None]) – Additional attributes associated with the evaluation results.

  • metric_groups (Union[IResolvable, Sequence[Union[IResolvable, MetricGroupProperty, Dict[str, Any]]], None]) – An evaluation Metric Group object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html

ExampleMetadata:

fixture=_generated

Example:

# 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

evaluation_detail_property = 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"
    )]
)

Attributes

datasets

The location of the datasets used to evaluate the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-datasets

evaluation_job_arn

The Amazon Resource Name (ARN) of the evaluation job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-evaluationjobarn

evaluation_observation

Any observations made during the model evaluation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-evaluationobservation

metadata

Additional attributes associated with the evaluation results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-metadata

metric_groups

An evaluation Metric Group object.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-metricgroups

name

The evaluation job name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-evaluationdetail.html#cfn-sagemaker-modelcard-evaluationdetail-name

FunctionProperty

class CfnModelCard.FunctionProperty(*, condition=None, facet=None, function=None)

Bases: object

Function details.

Parameters:
  • condition (Optional[str]) – An optional description of any conditions of your objective function metric.

  • facet (Optional[str]) – The metric of the model’s objective function. For example, loss or rmse . The following list shows examples of the values that you can specify for the metric: - ACCURACY - AUC - LOSS - MAE - RMSE

  • function (Optional[str]) – The optimization direction of the model’s objective function. You must specify one of the following values:. - Maximize - Minimize

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-function.html

ExampleMetadata:

fixture=_generated

Example:

# 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

function_property = sagemaker.CfnModelCard.FunctionProperty(
    condition="condition",
    facet="facet",
    function="function"
)

Attributes

condition

An optional description of any conditions of your objective function metric.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-function.html#cfn-sagemaker-modelcard-function-condition

facet

The metric of the model’s objective function.

For example, loss or rmse . The following list shows examples of the values that you can specify for the metric:

  • ACCURACY

  • AUC

  • LOSS

  • MAE

  • RMSE

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-function.html#cfn-sagemaker-modelcard-function-facet

function

.

  • Maximize

  • Minimize

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-function.html#cfn-sagemaker-modelcard-function-function

Type:

The optimization direction of the model’s objective function. You must specify one of the following values

InferenceEnvironmentProperty

class CfnModelCard.InferenceEnvironmentProperty(*, container_image=None)

Bases: object

An overview of a model’s inference environment.

Parameters:

container_image (Optional[Sequence[str]]) – The container used to run the inference environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-inferenceenvironment.html

ExampleMetadata:

fixture=_generated

Example:

# 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

inference_environment_property = sagemaker.CfnModelCard.InferenceEnvironmentProperty(
    container_image=["containerImage"]
)

Attributes

container_image

The container used to run the inference environment.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-inferenceenvironment.html#cfn-sagemaker-modelcard-inferenceenvironment-containerimage

InferenceSpecificationProperty

class CfnModelCard.InferenceSpecificationProperty(*, containers)

Bases: object

Defines how to perform inference generation after a training job is run.

Parameters:

containers (Union[IResolvable, Sequence[Union[IResolvable, ContainerProperty, Dict[str, Any]]]]) – The Amazon ECR registry path of the Docker image that contains the inference code.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-inferencespecification.html

ExampleMetadata:

fixture=_generated

Example:

# 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

inference_specification_property = sagemaker.CfnModelCard.InferenceSpecificationProperty(
    containers=[sagemaker.CfnModelCard.ContainerProperty(
        image="image",

        # the properties below are optional
        model_data_url="modelDataUrl",
        nearest_model_name="nearestModelName"
    )]
)

Attributes

containers

The Amazon ECR registry path of the Docker image that contains the inference code.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-inferencespecification.html#cfn-sagemaker-modelcard-inferencespecification-containers

IntendedUsesProperty

class CfnModelCard.IntendedUsesProperty(*, explanations_for_risk_rating=None, factors_affecting_model_efficiency=None, intended_uses=None, purpose_of_model=None, risk_rating=None)

Bases: object

The intended uses of a model.

Parameters:
  • explanations_for_risk_rating (Optional[str]) – An explanation of why your organization categorizes the model with its risk rating.

  • factors_affecting_model_efficiency (Optional[str]) – Factors affecting model efficacy.

  • intended_uses (Optional[str]) – The intended use cases for the model.

  • purpose_of_model (Optional[str]) – The general purpose of the model.

  • risk_rating (Optional[str]) – Your organization’s risk rating. You can specify one the following values as the risk rating:. - High - Medium - Low - Unknown

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html

ExampleMetadata:

fixture=_generated

Example:

# 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

intended_uses_property = sagemaker.CfnModelCard.IntendedUsesProperty(
    explanations_for_risk_rating="explanationsForRiskRating",
    factors_affecting_model_efficiency="factorsAffectingModelEfficiency",
    intended_uses="intendedUses",
    purpose_of_model="purposeOfModel",
    risk_rating="riskRating"
)

Attributes

explanations_for_risk_rating

An explanation of why your organization categorizes the model with its risk rating.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html#cfn-sagemaker-modelcard-intendeduses-explanationsforriskrating

factors_affecting_model_efficiency

Factors affecting model efficacy.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html#cfn-sagemaker-modelcard-intendeduses-factorsaffectingmodelefficiency

intended_uses

The intended use cases for the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html#cfn-sagemaker-modelcard-intendeduses-intendeduses

purpose_of_model

The general purpose of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html#cfn-sagemaker-modelcard-intendeduses-purposeofmodel

risk_rating

.

  • High

  • Medium

  • Low

  • Unknown

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-intendeduses.html#cfn-sagemaker-modelcard-intendeduses-riskrating

Type:

Your organization’s risk rating. You can specify one the following values as the risk rating

MetricDataItemsProperty

class CfnModelCard.MetricDataItemsProperty(*, name, type, value, notes=None, x_axis_name=None, y_axis_name=None)

Bases: object

Metric data.

The type determines the data types that you specify for value , XAxisName and YAxisName . For information about specifying values for metrics, see model card JSON schema .

Parameters:
  • name (str) –

  • type (str) –

  • value (Any) –

  • notes (Optional[str]) –

  • x_axis_name (Optional[Sequence[str]]) –

  • y_axis_name (Optional[Sequence[str]]) –

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html

ExampleMetadata:

fixture=_generated

Example:

# 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

metric_data_items_property = sagemaker.CfnModelCard.MetricDataItemsProperty(
    name="name",
    type="type",
    value=value,

    # the properties below are optional
    notes="notes",
    x_axis_name=["xAxisName"],
    y_axis_name=["yAxisName"]
)

Attributes

name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-name

Type:

see

notes

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-notes

Type:

see

type

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-type

Type:

see

value

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-value

Type:

see

x_axis_name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-xaxisname

Type:

see

y_axis_name

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricdataitems.html#cfn-sagemaker-modelcard-metricdataitems-yaxisname

Type:

see

MetricGroupProperty

class CfnModelCard.MetricGroupProperty(*, metric_data, name)

Bases: object

A group of metric data that you use to initialize a metric group object.

Parameters:
  • metric_data (Union[IResolvable, Sequence[Union[IResolvable, MetricDataItemsProperty, Dict[str, Any]]]]) –

    A list of metric objects. The MetricDataItems list can have one of the following values:. - bar_chart_metric - matrix_metric - simple_metric - linear_graph_metric For more information about the metric schema, see the definition section of the model card JSON schema .

  • name (str) – The metric group name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricgroup.html

ExampleMetadata:

fixture=_generated

Example:

# 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

metric_group_property = 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"
)

Attributes

metric_data

.

  • bar_chart_metric

  • matrix_metric

  • simple_metric

  • linear_graph_metric

For more information about the metric schema, see the definition section of the model card JSON schema .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricgroup.html#cfn-sagemaker-modelcard-metricgroup-metricdata

Type:

A list of metric objects. The MetricDataItems list can have one of the following values

name

The metric group name.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-metricgroup.html#cfn-sagemaker-modelcard-metricgroup-name

ModelOverviewProperty

class CfnModelCard.ModelOverviewProperty(*, algorithm_type=None, inference_environment=None, model_artifact=None, model_creator=None, model_description=None, model_id=None, model_name=None, model_owner=None, model_version=None, problem_type=None)

Bases: object

An overview about the model.

Parameters:
  • algorithm_type (Optional[str]) – The algorithm used to solve the problem.

  • inference_environment (Union[IResolvable, InferenceEnvironmentProperty, Dict[str, Any], None]) – An overview about model inference.

  • model_artifact (Optional[Sequence[str]]) – The location of the model artifact.

  • model_creator (Optional[str]) – The creator of the model.

  • model_description (Optional[str]) – A description of the model.

  • model_id (Optional[str]) – The SageMaker Model ARN or non- SageMaker Model ID.

  • model_name (Optional[str]) – The name of the model.

  • model_owner (Optional[str]) – The owner of the model.

  • model_version (Union[int, float, None]) – The version of the model.

  • problem_type (Optional[str]) – The problem being solved with the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html

ExampleMetadata:

fixture=_generated

Example:

# 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

model_overview_property = 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"
)

Attributes

algorithm_type

The algorithm used to solve the problem.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-algorithmtype

inference_environment

An overview about model inference.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-inferenceenvironment

model_artifact

The location of the model artifact.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelartifact

model_creator

The creator of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelcreator

model_description

A description of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modeldescription

model_id

The SageMaker Model ARN or non- SageMaker Model ID.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelid

model_name

The name of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelname

model_owner

The owner of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelowner

model_version

The version of the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-modelversion

problem_type

The problem being solved with the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modeloverview.html#cfn-sagemaker-modelcard-modeloverview-problemtype

ModelPackageCreatorProperty

class CfnModelCard.ModelPackageCreatorProperty(*, user_profile_name=None)

Bases: object

Parameters:

user_profile_name (Optional[str]) – The name of the user’s profile in Studio.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagecreator.html

ExampleMetadata:

fixture=_generated

Example:

# 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

model_package_creator_property = sagemaker.CfnModelCard.ModelPackageCreatorProperty(
    user_profile_name="userProfileName"
)

Attributes

user_profile_name

The name of the user’s profile in Studio.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagecreator.html#cfn-sagemaker-modelcard-modelpackagecreator-userprofilename

ModelPackageDetailsProperty

class CfnModelCard.ModelPackageDetailsProperty(*, approval_description=None, created_by=None, domain=None, inference_specification=None, model_approval_status=None, model_package_arn=None, model_package_description=None, model_package_group_name=None, model_package_name=None, model_package_status=None, model_package_version=None, source_algorithms=None, task=None)

Bases: object

Metadata information related to model package version.

Parameters:
  • approval_description (Optional[str]) – A description provided for the model approval.

  • created_by (Union[IResolvable, ModelPackageCreatorProperty, Dict[str, Any], None]) –

  • domain (Optional[str]) – The machine learning domain of the model package you specified. Common machine learning domains include computer vision and natural language processing.

  • inference_specification (Union[IResolvable, InferenceSpecificationProperty, Dict[str, Any], None]) –

  • model_approval_status (Optional[str]) – Current approval status of model package.

  • model_package_arn (Optional[str]) – The Amazon Resource Name (ARN) of the model package.

  • model_package_description (Optional[str]) – A brief summary of the model package.

  • model_package_group_name (Optional[str]) – If the model is a versioned model, the name of the model group that the versioned model belongs to.

  • model_package_name (Optional[str]) – Name of the model package.

  • model_package_status (Optional[str]) – Current status of model package.

  • model_package_version (Union[int, float, None]) – Version of the model package.

  • source_algorithms (Union[IResolvable, Sequence[Union[IResolvable, SourceAlgorithmProperty, Dict[str, Any]]], None]) –

  • task (Optional[str]) – The machine learning task you specified that your model package accomplishes. Common machine learning tasks include object detection and image classification.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html

ExampleMetadata:

fixture=_generated

Example:

# 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

model_package_details_property = 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"
)

Attributes

approval_description

A description provided for the model approval.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-approvaldescription

created_by

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-createdby

Type:

see

domain

The machine learning domain of the model package you specified.

Common machine learning domains include computer vision and natural language processing.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-domain

inference_specification

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-inferencespecification

Type:

see

model_approval_status

Current approval status of model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelapprovalstatus

model_package_arn

The Amazon Resource Name (ARN) of the model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackagearn

model_package_description

A brief summary of the model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackagedescription

model_package_group_name

If the model is a versioned model, the name of the model group that the versioned model belongs to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackagegroupname

model_package_name

Name of the model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackagename

model_package_status

Current status of model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackagestatus

model_package_version

Version of the model package.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-modelpackageversion

source_algorithms

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-sourcealgorithms

Type:

see

task

The machine learning task you specified that your model package accomplishes.

Common machine learning tasks include object detection and image classification.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-modelpackagedetails.html#cfn-sagemaker-modelcard-modelpackagedetails-task

ObjectiveFunctionProperty

class CfnModelCard.ObjectiveFunctionProperty(*, function=None, notes=None)

Bases: object

The function that is optimized during model training.

Parameters:
  • function (Union[IResolvable, FunctionProperty, Dict[str, Any], None]) – A function object that details optimization direction, metric, and additional descriptions.

  • notes (Optional[str]) – Notes about the object function, including other considerations for possible objective functions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html

ExampleMetadata:

fixture=_generated

Example:

# 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

objective_function_property = sagemaker.CfnModelCard.ObjectiveFunctionProperty(
    function=sagemaker.CfnModelCard.FunctionProperty(
        condition="condition",
        facet="facet",
        function="function"
    ),
    notes="notes"
)

Attributes

function

A function object that details optimization direction, metric, and additional descriptions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html#cfn-sagemaker-modelcard-objectivefunction-function

notes

Notes about the object function, including other considerations for possible objective functions.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-objectivefunction.html#cfn-sagemaker-modelcard-objectivefunction-notes

SecurityConfigProperty

class CfnModelCard.SecurityConfigProperty(*, kms_key_id=None)

Bases: object

The security configuration used to protect model card data.

Parameters:

kms_key_id (Optional[str]) – A AWS Key Management Service key ID used to encrypt a model card.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-securityconfig.html

ExampleMetadata:

fixture=_generated

Example:

# 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

security_config_property = sagemaker.CfnModelCard.SecurityConfigProperty(
    kms_key_id="kmsKeyId"
)

Attributes

kms_key_id

//docs.aws.amazon.com/kms/latest/developerguide/concepts.html#key-id-key-id>`_ used to encrypt a model card.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-securityconfig.html#cfn-sagemaker-modelcard-securityconfig-kmskeyid

Type:

A AWS Key Management Service `key ID <https

SourceAlgorithmProperty

class CfnModelCard.SourceAlgorithmProperty(*, algorithm_name, model_data_url=None)

Bases: object

Specifies an algorithm that was used to create the model package.

The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

Parameters:
  • algorithm_name (str) – The name of an algorithm that was used to create the model package. The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

  • model_data_url (Optional[str]) – The Amazon S3 path where the model artifacts, which result from model training, are stored. This path must point to a single gzip compressed tar archive ( .tar.gz suffix). .. epigraph:: The model artifacts must be in an S3 bucket that is in the same AWS region as the algorithm.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-sourcealgorithm.html

ExampleMetadata:

fixture=_generated

Example:

# 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

source_algorithm_property = sagemaker.CfnModelCard.SourceAlgorithmProperty(
    algorithm_name="algorithmName",

    # the properties below are optional
    model_data_url="modelDataUrl"
)

Attributes

algorithm_name

The name of an algorithm that was used to create the model package.

The algorithm must be either an algorithm resource in your SageMaker account or an algorithm in AWS Marketplace that you are subscribed to.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-sourcealgorithm.html#cfn-sagemaker-modelcard-sourcealgorithm-algorithmname

model_data_url

The Amazon S3 path where the model artifacts, which result from model training, are stored.

This path must point to a single gzip compressed tar archive ( .tar.gz suffix). .. epigraph:

The model artifacts must be in an S3 bucket that is in the same AWS region as the algorithm.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-sourcealgorithm.html#cfn-sagemaker-modelcard-sourcealgorithm-modeldataurl

TrainingDetailsProperty

class CfnModelCard.TrainingDetailsProperty(*, objective_function=None, training_job_details=None, training_observations=None)

Bases: object

The training details of the model.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingdetails.html

ExampleMetadata:

fixture=_generated

Example:

# 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

training_details_property = 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"
)

Attributes

objective_function

The function that is optimized during model training.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingdetails.html#cfn-sagemaker-modelcard-trainingdetails-objectivefunction

training_job_details

Details about any associated training jobs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingdetails.html#cfn-sagemaker-modelcard-trainingdetails-trainingjobdetails

training_observations

Any observations about training.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingdetails.html#cfn-sagemaker-modelcard-trainingdetails-trainingobservations

TrainingEnvironmentProperty

class CfnModelCard.TrainingEnvironmentProperty(*, container_image=None)

Bases: object

SageMaker training image.

Parameters:

container_image (Optional[Sequence[str]]) – SageMaker inference image URI.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingenvironment.html

ExampleMetadata:

fixture=_generated

Example:

# 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

training_environment_property = sagemaker.CfnModelCard.TrainingEnvironmentProperty(
    container_image=["containerImage"]
)

Attributes

container_image

SageMaker inference image URI.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingenvironment.html#cfn-sagemaker-modelcard-trainingenvironment-containerimage

TrainingHyperParameterProperty

class CfnModelCard.TrainingHyperParameterProperty(*, name, value)

Bases: object

A hyper parameter that was configured in training the model.

Parameters:
  • name (str) – The name of the hyper parameter.

  • value (str) – The value specified for the hyper parameter.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-traininghyperparameter.html

ExampleMetadata:

fixture=_generated

Example:

# 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

training_hyper_parameter_property = sagemaker.CfnModelCard.TrainingHyperParameterProperty(
    name="name",
    value="value"
)

Attributes

name

The name of the hyper parameter.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-traininghyperparameter.html#cfn-sagemaker-modelcard-traininghyperparameter-name

value

The value specified for the hyper parameter.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-traininghyperparameter.html#cfn-sagemaker-modelcard-traininghyperparameter-value

TrainingJobDetailsProperty

class CfnModelCard.TrainingJobDetailsProperty(*, hyper_parameters=None, training_arn=None, training_datasets=None, training_environment=None, training_metrics=None, user_provided_hyper_parameters=None, user_provided_training_metrics=None)

Bases: object

The overview of a training job.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html

ExampleMetadata:

fixture=_generated

Example:

# 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

training_job_details_property = 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"
    )]
)

Attributes

hyper_parameters

The hyper parameters used in the training job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-hyperparameters

training_arn

The SageMaker training job Amazon Resource Name (ARN).

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-trainingarn

training_datasets

The location of the datasets used to train the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-trainingdatasets

training_environment

The SageMaker training job image URI.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-trainingenvironment

training_metrics

The SageMaker training job results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-trainingmetrics

user_provided_hyper_parameters

Additional hyper parameters that you’ve specified when training the model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-userprovidedhyperparameters

user_provided_training_metrics

Custom training job results.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingjobdetails.html#cfn-sagemaker-modelcard-trainingjobdetails-userprovidedtrainingmetrics

TrainingMetricProperty

class CfnModelCard.TrainingMetricProperty(*, name, value, notes=None)

Bases: object

A result from a SageMaker training job.

Parameters:
  • name (str) – The name of the result from the SageMaker training job.

  • value (Union[int, float]) – The value of a result from the SageMaker training job.

  • notes (Optional[str]) – Any additional notes describing the result of the training job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html

ExampleMetadata:

fixture=_generated

Example:

# 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

training_metric_property = sagemaker.CfnModelCard.TrainingMetricProperty(
    name="name",
    value=123,

    # the properties below are optional
    notes="notes"
)

Attributes

name

The name of the result from the SageMaker training job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-name

notes

Any additional notes describing the result of the training job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-notes

value

The value of a result from the SageMaker training job.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-trainingmetric.html#cfn-sagemaker-modelcard-trainingmetric-value

UserContextProperty

class CfnModelCard.UserContextProperty(*, domain_id=None, user_profile_arn=None, user_profile_name=None)

Bases: object

Information about the user who created or modified an experiment, trial, trial component, lineage group, project, or model card.

Parameters:
  • domain_id (Optional[str]) – The domain associated with the user. Default: - “UnsetValue”

  • user_profile_arn (Optional[str]) – The Amazon Resource Name (ARN) of the user’s profile. Default: - “UnsetValue”

  • user_profile_name (Optional[str]) – The name of the user’s profile. Default: - “UnsetValue”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-usercontext.html

ExampleMetadata:

fixture=_generated

Example:

# 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

user_context_property = sagemaker.CfnModelCard.UserContextProperty(
    domain_id="domainId",
    user_profile_arn="userProfileArn",
    user_profile_name="userProfileName"
)

Attributes

domain_id

The domain associated with the user.

Default:
  • “UnsetValue”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-usercontext.html#cfn-sagemaker-modelcard-usercontext-domainid

user_profile_arn

The Amazon Resource Name (ARN) of the user’s profile.

Default:
  • “UnsetValue”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-usercontext.html#cfn-sagemaker-modelcard-usercontext-userprofilearn

user_profile_name

The name of the user’s profile.

Default:
  • “UnsetValue”

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-sagemaker-modelcard-usercontext.html#cfn-sagemaker-modelcard-usercontext-userprofilename