CfnModelCardPropsMixin
- class aws_cdk.mixins_preview.aws_sagemaker.mixins.CfnModelCardPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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
- Mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # value: Any cfn_model_card_props_mixin = sagemaker_mixins.CfnModelCardPropsMixin(sagemaker_mixins.CfnModelCardMixinProps( content=sagemaker_mixins.CfnModelCardPropsMixin.ContentProperty( additional_information=sagemaker_mixins.CfnModelCardPropsMixin.AdditionalInformationProperty( caveats_and_recommendations="caveatsAndRecommendations", custom_details={ "custom_details_key": "customDetails" }, ethical_considerations="ethicalConsiderations" ), business_details=sagemaker_mixins.CfnModelCardPropsMixin.BusinessDetailsProperty( business_problem="businessProblem", business_stakeholders="businessStakeholders", line_of_business="lineOfBusiness" ), evaluation_details=[sagemaker_mixins.CfnModelCardPropsMixin.EvaluationDetailProperty( datasets=["datasets"], evaluation_job_arn="evaluationJobArn", evaluation_observation="evaluationObservation", metadata={ "metadata_key": "metadata" }, metric_groups=[sagemaker_mixins.CfnModelCardPropsMixin.MetricGroupProperty( metric_data=[sagemaker_mixins.CfnModelCardPropsMixin.MetricDataItemsProperty( name="name", notes="notes", type="type", value=value, x_axis_name=["xAxisName"], y_axis_name=["yAxisName"] )], name="name" )], name="name" )], intended_uses=sagemaker_mixins.CfnModelCardPropsMixin.IntendedUsesProperty( explanations_for_risk_rating="explanationsForRiskRating", factors_affecting_model_efficiency="factorsAffectingModelEfficiency", intended_uses="intendedUses", purpose_of_model="purposeOfModel", risk_rating="riskRating" ), model_overview=sagemaker_mixins.CfnModelCardPropsMixin.ModelOverviewProperty( algorithm_type="algorithmType", inference_environment=sagemaker_mixins.CfnModelCardPropsMixin.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_mixins.CfnModelCardPropsMixin.ModelPackageDetailsProperty( approval_description="approvalDescription", created_by=sagemaker_mixins.CfnModelCardPropsMixin.ModelPackageCreatorProperty( user_profile_name="userProfileName" ), domain="domain", inference_specification=sagemaker_mixins.CfnModelCardPropsMixin.InferenceSpecificationProperty( containers=[sagemaker_mixins.CfnModelCardPropsMixin.ContainerProperty( image="image", 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_mixins.CfnModelCardPropsMixin.SourceAlgorithmProperty( algorithm_name="algorithmName", model_data_url="modelDataUrl" )], task="task" ), training_details=sagemaker_mixins.CfnModelCardPropsMixin.TrainingDetailsProperty( objective_function=sagemaker_mixins.CfnModelCardPropsMixin.ObjectiveFunctionProperty( function=sagemaker_mixins.CfnModelCardPropsMixin.FunctionProperty( condition="condition", facet="facet", function="function" ), notes="notes" ), training_job_details=sagemaker_mixins.CfnModelCardPropsMixin.TrainingJobDetailsProperty( hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], training_arn="trainingArn", training_datasets=["trainingDatasets"], training_environment=sagemaker_mixins.CfnModelCardPropsMixin.TrainingEnvironmentProperty( container_image=["containerImage"] ), training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )], user_provided_hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], user_provided_training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )] ), training_observations="trainingObservations" ) ), created_by=sagemaker_mixins.CfnModelCardPropsMixin.UserContextProperty( domain_id="domainId", user_profile_arn="userProfileArn", user_profile_name="userProfileName" ), last_modified_by=sagemaker_mixins.CfnModelCardPropsMixin.UserContextProperty( domain_id="domainId", user_profile_arn="userProfileArn", user_profile_name="userProfileName" ), model_card_name="modelCardName", model_card_status="modelCardStatus", security_config=sagemaker_mixins.CfnModelCardPropsMixin.SecurityConfigProperty( kms_key_id="kmsKeyId" ), tags=[CfnTag( key="key", value="value" )] ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::SageMaker::ModelCard.- Parameters:
props (
Union[CfnModelCardMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['content', 'createdBy', 'lastModifiedBy', 'modelCardName', 'modelCardStatus', 'securityConfig', 'tags']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AdditionalInformationProperty
- class CfnModelCardPropsMixin.AdditionalInformationProperty(*, caveats_and_recommendations=None, custom_details=None, ethical_considerations=None)
Bases:
objectAdditional 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[Mapping[str,str],IResolvable,None]) – Any additional information to document about the model.ethical_considerations (
Optional[str]) – Any ethical considerations documented by the model card author.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins additional_information_property = sagemaker_mixins.CfnModelCardPropsMixin.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.
- custom_details
Any additional information to document about the model.
- ethical_considerations
Any ethical considerations documented by the model card author.
BusinessDetailsProperty
- class CfnModelCardPropsMixin.BusinessDetailsProperty(*, business_problem=None, business_stakeholders=None, line_of_business=None)
Bases:
objectInformation 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins business_details_property = sagemaker_mixins.CfnModelCardPropsMixin.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.
- business_stakeholders
The relevant stakeholders for the model.
- line_of_business
The broader business need that the model is serving.
ContainerProperty
- class CfnModelCardPropsMixin.ContainerProperty(*, image=None, model_data_url=None, nearest_model_name=None)
Bases:
object- Parameters:
image (
Optional[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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins container_property = sagemaker_mixins.CfnModelCardPropsMixin.ContainerProperty( image="image", 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.
- model_data_url
The Amazon S3 path where the model artifacts, which result from model training, are stored.
- nearest_model_name
The name of a pre-trained machine learning benchmarked by Amazon SageMaker Inference Recommender model that matches your model.
ContentProperty
- class CfnModelCardPropsMixin.ContentProperty(*, additional_information=None, business_details=None, evaluation_details=None, intended_uses=None, model_overview=None, model_package_details=None, training_details=None)
Bases:
objectThe content of the model card.
It follows the model card json schema .
- Parameters:
additional_information (
Union[IResolvable,AdditionalInformationProperty,Dict[str,Any],None]) – Additional information about the model.business_details (
Union[IResolvable,BusinessDetailsProperty,Dict[str,Any],None]) – Information about how the model supports business goals.evaluation_details (
Union[IResolvable,Sequence[Union[IResolvable,EvaluationDetailProperty,Dict[str,Any]]],None]) – An overview about the model’s evaluation.intended_uses (
Union[IResolvable,IntendedUsesProperty,Dict[str,Any],None]) – The intended usage of the model.model_overview (
Union[IResolvable,ModelOverviewProperty,Dict[str,Any],None]) – An overview about the model.model_package_details (
Union[IResolvable,ModelPackageDetailsProperty,Dict[str,Any],None]) – Metadata information related to model package version.training_details (
Union[IResolvable,TrainingDetailsProperty,Dict[str,Any],None]) – An overview about model training.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # value: Any content_property = sagemaker_mixins.CfnModelCardPropsMixin.ContentProperty( additional_information=sagemaker_mixins.CfnModelCardPropsMixin.AdditionalInformationProperty( caveats_and_recommendations="caveatsAndRecommendations", custom_details={ "custom_details_key": "customDetails" }, ethical_considerations="ethicalConsiderations" ), business_details=sagemaker_mixins.CfnModelCardPropsMixin.BusinessDetailsProperty( business_problem="businessProblem", business_stakeholders="businessStakeholders", line_of_business="lineOfBusiness" ), evaluation_details=[sagemaker_mixins.CfnModelCardPropsMixin.EvaluationDetailProperty( datasets=["datasets"], evaluation_job_arn="evaluationJobArn", evaluation_observation="evaluationObservation", metadata={ "metadata_key": "metadata" }, metric_groups=[sagemaker_mixins.CfnModelCardPropsMixin.MetricGroupProperty( metric_data=[sagemaker_mixins.CfnModelCardPropsMixin.MetricDataItemsProperty( name="name", notes="notes", type="type", value=value, x_axis_name=["xAxisName"], y_axis_name=["yAxisName"] )], name="name" )], name="name" )], intended_uses=sagemaker_mixins.CfnModelCardPropsMixin.IntendedUsesProperty( explanations_for_risk_rating="explanationsForRiskRating", factors_affecting_model_efficiency="factorsAffectingModelEfficiency", intended_uses="intendedUses", purpose_of_model="purposeOfModel", risk_rating="riskRating" ), model_overview=sagemaker_mixins.CfnModelCardPropsMixin.ModelOverviewProperty( algorithm_type="algorithmType", inference_environment=sagemaker_mixins.CfnModelCardPropsMixin.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_mixins.CfnModelCardPropsMixin.ModelPackageDetailsProperty( approval_description="approvalDescription", created_by=sagemaker_mixins.CfnModelCardPropsMixin.ModelPackageCreatorProperty( user_profile_name="userProfileName" ), domain="domain", inference_specification=sagemaker_mixins.CfnModelCardPropsMixin.InferenceSpecificationProperty( containers=[sagemaker_mixins.CfnModelCardPropsMixin.ContainerProperty( image="image", 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_mixins.CfnModelCardPropsMixin.SourceAlgorithmProperty( algorithm_name="algorithmName", model_data_url="modelDataUrl" )], task="task" ), training_details=sagemaker_mixins.CfnModelCardPropsMixin.TrainingDetailsProperty( objective_function=sagemaker_mixins.CfnModelCardPropsMixin.ObjectiveFunctionProperty( function=sagemaker_mixins.CfnModelCardPropsMixin.FunctionProperty( condition="condition", facet="facet", function="function" ), notes="notes" ), training_job_details=sagemaker_mixins.CfnModelCardPropsMixin.TrainingJobDetailsProperty( hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], training_arn="trainingArn", training_datasets=["trainingDatasets"], training_environment=sagemaker_mixins.CfnModelCardPropsMixin.TrainingEnvironmentProperty( container_image=["containerImage"] ), training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )], user_provided_hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], user_provided_training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )] ), training_observations="trainingObservations" ) )
Attributes
- additional_information
Additional information about the model.
- business_details
Information about how the model supports business goals.
- evaluation_details
An overview about the model’s evaluation.
- intended_uses
The intended usage of the model.
- model_overview
An overview about the model.
- model_package_details
Metadata information related to model package version.
- training_details
An overview about model training.
EvaluationDetailProperty
- class CfnModelCardPropsMixin.EvaluationDetailProperty(*, datasets=None, evaluation_job_arn=None, evaluation_observation=None, metadata=None, metric_groups=None, name=None)
Bases:
objectThe evaluation details of the model.
- Parameters:
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[Mapping[str,str],IResolvable,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.name (
Optional[str]) – The evaluation job name.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # value: Any evaluation_detail_property = sagemaker_mixins.CfnModelCardPropsMixin.EvaluationDetailProperty( datasets=["datasets"], evaluation_job_arn="evaluationJobArn", evaluation_observation="evaluationObservation", metadata={ "metadata_key": "metadata" }, metric_groups=[sagemaker_mixins.CfnModelCardPropsMixin.MetricGroupProperty( metric_data=[sagemaker_mixins.CfnModelCardPropsMixin.MetricDataItemsProperty( name="name", notes="notes", type="type", value=value, x_axis_name=["xAxisName"], y_axis_name=["yAxisName"] )], name="name" )], name="name" )
Attributes
- datasets
The location of the datasets used to evaluate the model.
- evaluation_job_arn
The Amazon Resource Name (ARN) of the evaluation job.
- evaluation_observation
Any observations made during the model evaluation.
- metadata
Additional attributes associated with the evaluation results.
- metric_groups
An evaluation Metric Group object.
FunctionProperty
- class CfnModelCardPropsMixin.FunctionProperty(*, condition=None, facet=None, function=None)
Bases:
objectFunction 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-RMSEfunction (
Optional[str]) – The optimization direction of the model’s objective function. You must specify one of the following values:. -Maximize-Minimize
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins function_property = sagemaker_mixins.CfnModelCardPropsMixin.FunctionProperty( condition="condition", facet="facet", function="function" )
Attributes
- condition
An optional description of any conditions of your objective function metric.
- 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:
ACCURACYAUCLOSSMAERMSE
- function
.
MaximizeMinimize
- See:
- Type:
The optimization direction of the model’s objective function. You must specify one of the following values
InferenceEnvironmentProperty
- class CfnModelCardPropsMixin.InferenceEnvironmentProperty(*, container_image=None)
Bases:
objectAn overview of a model’s inference environment.
- Parameters:
container_image (
Optional[Sequence[str]]) – The container used to run the inference environment.- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins inference_environment_property = sagemaker_mixins.CfnModelCardPropsMixin.InferenceEnvironmentProperty( container_image=["containerImage"] )
Attributes
- container_image
The container used to run the inference environment.
InferenceSpecificationProperty
- class CfnModelCardPropsMixin.InferenceSpecificationProperty(*, containers=None)
Bases:
objectDefines how to perform inference generation after a training job is run.
- Parameters:
containers (
Union[IResolvable,Sequence[Union[IResolvable,ContainerProperty,Dict[str,Any]]],None]) – The Amazon ECR registry path of the Docker image that contains the inference code.- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins inference_specification_property = sagemaker_mixins.CfnModelCardPropsMixin.InferenceSpecificationProperty( containers=[sagemaker_mixins.CfnModelCardPropsMixin.ContainerProperty( image="image", model_data_url="modelDataUrl", nearest_model_name="nearestModelName" )] )
Attributes
- containers
The Amazon ECR registry path of the Docker image that contains the inference code.
IntendedUsesProperty
- class CfnModelCardPropsMixin.IntendedUsesProperty(*, explanations_for_risk_rating=None, factors_affecting_model_efficiency=None, intended_uses=None, purpose_of_model=None, risk_rating=None)
Bases:
objectThe 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins intended_uses_property = sagemaker_mixins.CfnModelCardPropsMixin.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.
- factors_affecting_model_efficiency
Factors affecting model efficacy.
- intended_uses
The intended use cases for the model.
- purpose_of_model
The general purpose of the model.
- risk_rating
.
High
Medium
Low
Unknown
- See:
- Type:
Your organization’s risk rating. You can specify one the following values as the risk rating
MetricDataItemsProperty
- class CfnModelCardPropsMixin.MetricDataItemsProperty(*, name=None, notes=None, type=None, value=None, x_axis_name=None, y_axis_name=None)
Bases:
objectMetric data.
The
typedetermines the data types that you specify forvalue,XAxisNameandYAxisName. For information about specifying values for metrics, see model card JSON schema .- Parameters:
name (
Optional[str])notes (
Optional[str])type (
Optional[str])value (
Any)x_axis_name (
Optional[Sequence[str]])y_axis_name (
Optional[Sequence[str]])
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # value: Any metric_data_items_property = sagemaker_mixins.CfnModelCardPropsMixin.MetricDataItemsProperty( name="name", notes="notes", type="type", value=value, x_axis_name=["xAxisName"], y_axis_name=["yAxisName"] )
Attributes
- name
-
- Type:
see
- notes
-
- Type:
see
- type
-
- Type:
see
- value
-
- Type:
see
- x_axis_name
-
- Type:
see
MetricGroupProperty
- class CfnModelCardPropsMixin.MetricGroupProperty(*, metric_data=None, name=None)
Bases:
objectA 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]]],None]) –A list of metric objects. The
MetricDataItemslist can have one of the following values:. -bar_chart_metric-matrix_metric-simple_metric-linear_graph_metricFor more information about the metric schema, see the definition section of the model card JSON schema .name (
Optional[str]) – The metric group name.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins # value: Any metric_group_property = sagemaker_mixins.CfnModelCardPropsMixin.MetricGroupProperty( metric_data=[sagemaker_mixins.CfnModelCardPropsMixin.MetricDataItemsProperty( name="name", notes="notes", type="type", value=value, x_axis_name=["xAxisName"], y_axis_name=["yAxisName"] )], name="name" )
Attributes
- metric_data
.
bar_chart_metricmatrix_metricsimple_metriclinear_graph_metric
For more information about the metric schema, see the definition section of the model card JSON schema .
- See:
- Type:
A list of metric objects. The
MetricDataItemslist can have one of the following values
ModelOverviewProperty
- class CfnModelCardPropsMixin.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:
objectAn 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 AI Model ARN or non- SageMaker AI 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins model_overview_property = sagemaker_mixins.CfnModelCardPropsMixin.ModelOverviewProperty( algorithm_type="algorithmType", inference_environment=sagemaker_mixins.CfnModelCardPropsMixin.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.
- inference_environment
An overview about model inference.
- model_artifact
The location of the model artifact.
- model_creator
The creator of the model.
- model_description
A description of the model.
- model_id
The SageMaker AI Model ARN or non- SageMaker AI Model ID.
- model_name
The name of the model.
- model_owner
The owner of the model.
- model_version
The version of the model.
- problem_type
The problem being solved with the model.
ModelPackageCreatorProperty
- class CfnModelCardPropsMixin.ModelPackageCreatorProperty(*, user_profile_name=None)
Bases:
object- Parameters:
user_profile_name (
Optional[str]) – The name of the user’s profile in Studio.- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins model_package_creator_property = sagemaker_mixins.CfnModelCardPropsMixin.ModelPackageCreatorProperty( user_profile_name="userProfileName" )
Attributes
- user_profile_name
The name of the user’s profile in Studio.
ModelPackageDetailsProperty
- class CfnModelCardPropsMixin.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:
objectMetadata 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins model_package_details_property = sagemaker_mixins.CfnModelCardPropsMixin.ModelPackageDetailsProperty( approval_description="approvalDescription", created_by=sagemaker_mixins.CfnModelCardPropsMixin.ModelPackageCreatorProperty( user_profile_name="userProfileName" ), domain="domain", inference_specification=sagemaker_mixins.CfnModelCardPropsMixin.InferenceSpecificationProperty( containers=[sagemaker_mixins.CfnModelCardPropsMixin.ContainerProperty( image="image", 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_mixins.CfnModelCardPropsMixin.SourceAlgorithmProperty( algorithm_name="algorithmName", model_data_url="modelDataUrl" )], task="task" )
Attributes
- approval_description
A description provided for the model approval.
- created_by
-
- Type:
see
- domain
The machine learning domain of the model package you specified.
Common machine learning domains include computer vision and natural language processing.
- inference_specification
-
- Type:
see
- model_approval_status
Current approval status of model package.
- model_package_arn
The Amazon Resource Name (ARN) of the model package.
- model_package_description
A brief summary of the model package.
- model_package_group_name
If the model is a versioned model, the name of the model group that the versioned model belongs to.
- model_package_name
Name of the model package.
- model_package_status
Current status of model package.
- model_package_version
Version of the model package.
- source_algorithms
-
- Type:
see
- task
The machine learning task you specified that your model package accomplishes.
Common machine learning tasks include object detection and image classification.
ObjectiveFunctionProperty
- class CfnModelCardPropsMixin.ObjectiveFunctionProperty(*, function=None, notes=None)
Bases:
objectThe 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins objective_function_property = sagemaker_mixins.CfnModelCardPropsMixin.ObjectiveFunctionProperty( function=sagemaker_mixins.CfnModelCardPropsMixin.FunctionProperty( condition="condition", facet="facet", function="function" ), notes="notes" )
Attributes
- function
A function object that details optimization direction, metric, and additional descriptions.
- notes
Notes about the object function, including other considerations for possible objective functions.
SecurityConfigProperty
- class CfnModelCardPropsMixin.SecurityConfigProperty(*, kms_key_id=None)
Bases:
objectThe 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins security_config_property = sagemaker_mixins.CfnModelCardPropsMixin.SecurityConfigProperty( kms_key_id="kmsKeyId" )
Attributes
SourceAlgorithmProperty
- class CfnModelCardPropsMixin.SourceAlgorithmProperty(*, algorithm_name=None, model_data_url=None)
Bases:
objectSpecifies 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 (
Optional[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 singlegzipcompressed tar archive (.tar.gzsuffix). .. epigraph:: The model artifacts must be in an S3 bucket that is in the same AWS region as the algorithm.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins source_algorithm_property = sagemaker_mixins.CfnModelCardPropsMixin.SourceAlgorithmProperty( algorithm_name="algorithmName", 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.
- 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
gzipcompressed tar archive (.tar.gzsuffix). .. epigraph:The model artifacts must be in an S3 bucket that is in the same AWS region as the algorithm.
TrainingDetailsProperty
- class CfnModelCardPropsMixin.TrainingDetailsProperty(*, objective_function=None, training_job_details=None, training_observations=None)
Bases:
objectThe training details of the model.
- Parameters:
objective_function (
Union[IResolvable,ObjectiveFunctionProperty,Dict[str,Any],None]) – The function that is optimized during model training.training_job_details (
Union[IResolvable,TrainingJobDetailsProperty,Dict[str,Any],None]) – Details about any associated training jobs.training_observations (
Optional[str]) – Any observations about training.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins training_details_property = sagemaker_mixins.CfnModelCardPropsMixin.TrainingDetailsProperty( objective_function=sagemaker_mixins.CfnModelCardPropsMixin.ObjectiveFunctionProperty( function=sagemaker_mixins.CfnModelCardPropsMixin.FunctionProperty( condition="condition", facet="facet", function="function" ), notes="notes" ), training_job_details=sagemaker_mixins.CfnModelCardPropsMixin.TrainingJobDetailsProperty( hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], training_arn="trainingArn", training_datasets=["trainingDatasets"], training_environment=sagemaker_mixins.CfnModelCardPropsMixin.TrainingEnvironmentProperty( container_image=["containerImage"] ), training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )], user_provided_hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], user_provided_training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )] ), training_observations="trainingObservations" )
Attributes
- objective_function
The function that is optimized during model training.
- training_job_details
Details about any associated training jobs.
- training_observations
Any observations about training.
TrainingEnvironmentProperty
- class CfnModelCardPropsMixin.TrainingEnvironmentProperty(*, container_image=None)
Bases:
objectSageMaker AI training image.
- Parameters:
container_image (
Optional[Sequence[str]]) – SageMaker AI inference image URI.- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins training_environment_property = sagemaker_mixins.CfnModelCardPropsMixin.TrainingEnvironmentProperty( container_image=["containerImage"] )
Attributes
- container_image
SageMaker AI inference image URI.
TrainingHyperParameterProperty
- class CfnModelCardPropsMixin.TrainingHyperParameterProperty(*, name=None, value=None)
Bases:
objectA hyper parameter that was configured in training the model.
- Parameters:
name (
Optional[str]) – The name of the hyper parameter.value (
Optional[str]) – The value specified for the hyper parameter.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins training_hyper_parameter_property = sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )
Attributes
- name
The name of the hyper parameter.
- value
The value specified for the hyper parameter.
TrainingJobDetailsProperty
- class CfnModelCardPropsMixin.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:
objectThe overview of a training job.
- Parameters:
hyper_parameters (
Union[IResolvable,Sequence[Union[IResolvable,TrainingHyperParameterProperty,Dict[str,Any]]],None]) – The hyper parameters used in the training job.training_arn (
Optional[str]) – The SageMaker AI training job Amazon Resource Name (ARN).training_datasets (
Optional[Sequence[str]]) – The location of the datasets used to train the model.training_environment (
Union[IResolvable,TrainingEnvironmentProperty,Dict[str,Any],None]) – The SageMaker AI training job image URI.training_metrics (
Union[IResolvable,Sequence[Union[IResolvable,TrainingMetricProperty,Dict[str,Any]]],None]) – The SageMaker AI training job results.user_provided_hyper_parameters (
Union[IResolvable,Sequence[Union[IResolvable,TrainingHyperParameterProperty,Dict[str,Any]]],None]) – Additional hyper parameters that you’ve specified when training the model.user_provided_training_metrics (
Union[IResolvable,Sequence[Union[IResolvable,TrainingMetricProperty,Dict[str,Any]]],None]) – Custom training job results.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins training_job_details_property = sagemaker_mixins.CfnModelCardPropsMixin.TrainingJobDetailsProperty( hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], training_arn="trainingArn", training_datasets=["trainingDatasets"], training_environment=sagemaker_mixins.CfnModelCardPropsMixin.TrainingEnvironmentProperty( container_image=["containerImage"] ), training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )], user_provided_hyper_parameters=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingHyperParameterProperty( name="name", value="value" )], user_provided_training_metrics=[sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )] )
Attributes
- hyper_parameters
The hyper parameters used in the training job.
- training_arn
The SageMaker AI training job Amazon Resource Name (ARN).
- training_datasets
The location of the datasets used to train the model.
- training_environment
The SageMaker AI training job image URI.
- training_metrics
The SageMaker AI training job results.
- user_provided_hyper_parameters
Additional hyper parameters that you’ve specified when training the model.
- user_provided_training_metrics
Custom training job results.
TrainingMetricProperty
- class CfnModelCardPropsMixin.TrainingMetricProperty(*, name=None, notes=None, value=None)
Bases:
objectA result from a SageMaker AI training job.
- Parameters:
name (
Optional[str]) – The name of the result from the SageMaker AI training job.notes (
Optional[str]) – Any additional notes describing the result of the training job.value (
Union[int,float,None]) – The value of a result from the SageMaker AI training job.
- See:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins training_metric_property = sagemaker_mixins.CfnModelCardPropsMixin.TrainingMetricProperty( name="name", notes="notes", value=123 )
Attributes
- name
The name of the result from the SageMaker AI training job.
- notes
Any additional notes describing the result of the training job.
- value
The value of a result from the SageMaker AI training job.
UserContextProperty
- class CfnModelCardPropsMixin.UserContextProperty(*, domain_id=None, user_profile_arn=None, user_profile_name=None)
Bases:
objectInformation about the user who created or modified a SageMaker resource.
- 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:
- 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.mixins_preview.aws_sagemaker import mixins as sagemaker_mixins user_context_property = sagemaker_mixins.CfnModelCardPropsMixin.UserContextProperty( domain_id="domainId", user_profile_arn="userProfileArn", user_profile_name="userProfileName" )
Attributes
- domain_id
The domain associated with the user.
- user_profile_arn
The Amazon Resource Name (ARN) of the user’s profile.
- user_profile_name
The name of the user’s profile.