cfn/classification_pipeline.yaml [514:674]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                            "InstanceType": "ml.m5.4xlarge",
                            "VolumeSizeInGB": 30
                        },
                        "RoleArn": "arn:aws:iam::${AWS::AccountId}:role/service-role/AmazonSageMaker-ExecutionRole-TrainingInferencePipeline",
                        "InputDataConfig": [
                            {
                                "DataSource": {
                                    "S3DataSource": {
                                        "S3DataType": "S3Prefix",
                                        "S3Uri": "s3://${PipelineBucketName}/data/train_data",
                                        "S3DataDistributionType": "FullyReplicated"
                                    }
                                },
                                "ContentType": "text/csv",
                                "ChannelName": "train"
                            },
                            {
                                "DataSource": {
                                    "S3DataSource": {
                                        "S3DataType": "S3Prefix",
                                        "S3Uri": "s3://${PipelineBucketName}/data/test_data",
                                        "S3DataDistributionType": "FullyReplicated"
                                    }
                                },
                                "ContentType": "text/csv",
                                "ChannelName": "validation"
                            }
                        ],
                        "TrainingJobName.$": "$$.Execution.Input['TrainingJobName']",
                        "DebugHookConfig": {
                            "S3OutputPath": "s3://${PipelineBucketName}/debug",
                            "HookParameters": {
                                "save_interval": "5",
                                "include_regex": ".*"
                            },
                            "CollectionConfigurations": [
                                {
                                    "CollectionName": "metrics"
                                },
                                {
                                    "CollectionName": "feature_importance"
                                },
                                {
                                    "CollectionName": "full_shap"
                                },
                                {
                                    "CollectionName": "average_shap"
                                }
                            ]
                        },
                        "DebugRuleConfigurations": [
                            {
                                "RuleConfigurationName": "LossNotDecreasing",
                                "RuleEvaluatorImage": "${DebuggerImageId}.dkr.ecr.${AWS::Region}.amazonaws.com/sagemaker-debugger-rules:latest",
                                "RuleParameters": {
                                    "rule_to_invoke": "LossNotDecreasing",
                                    "collection_names": "metrics",
                                    "num_steps": "10"
                                }
                            }
                        ],
                        "HyperParameters.$": "$"
                    },
                    "Type": "Task",
                    "Next": "SageMaker Step Save Model",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Save Model": {
                    "Parameters": {
                        "ExecutionRoleArn": "arn:aws:iam::${AWS::AccountId}:role/service-role/AmazonSageMaker-ExecutionRole-TrainingInferencePipeline",
                        "ModelName.$": "$$.Execution.Input['ModelName']",
                        "PrimaryContainer": {
                            "Environment": {},
                            "Image": "${XgbImageID}.dkr.ecr.${AWS::Region}.amazonaws.com/sagemaker-xgboost:1.2-1",
                            "ModelDataUrl.$": "$['ModelArtifacts']['S3ModelArtifacts']"
                        }
                    },
                    "Resource": "arn:aws:states:::sagemaker:createModel",
                    "Type": "Task",
                    "Next": "SageMaker Step Get Model Url",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Get Model Url": {
                    "Parameters": {
                        "FunctionName": "${LambdaFunctionGetModelData}",
                        "Payload": {
                            "TrainingJobName.$": "$"
                        }
                    },
                    "OutputPath": "$.Payload.body",
                    "Resource": "arn:aws:states:::lambda:invoke",
                    "Type": "Task",
                    "Next": "SageMaker Step Model Explainability",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Model Explainability": {
                    "Resource": "arn:aws:states:::sagemaker:createProcessingJob.sync",
                    "Parameters": {
                        "ProcessingJobName.$": "$$.Execution.Input['EvaluationProcessingJobName']",
                        "ProcessingInputs": [
                            {
                                "InputName": "train_data",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri": "s3://${PipelineBucketName}/data/train_data",
                                    "LocalPath": "/opt/ml/processing/train",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "test_data",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri": "s3://${PipelineBucketName}/data/test_data",
                                    "LocalPath": "/opt/ml/processing/test",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "model",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri.$": "$['modelDataUrl']",
                                    "LocalPath": "/opt/ml/processing/model",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "code",
                                "AppManaged": false,
                                "S3Input": {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cfn/time_to_event_pipeline.yaml [515:675]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
                            "InstanceType": "ml.m5.4xlarge",
                            "VolumeSizeInGB": 30
                        },
                        "RoleArn": "arn:aws:iam::${AWS::AccountId}:role/service-role/AmazonSageMaker-ExecutionRole-TrainingInferencePipeline",
                        "InputDataConfig": [
                            {
                                "DataSource": {
                                    "S3DataSource": {
                                        "S3DataType": "S3Prefix",
                                        "S3Uri": "s3://${PipelineBucketName}/data/train_data",
                                        "S3DataDistributionType": "FullyReplicated"
                                    }
                                },
                                "ContentType": "text/csv",
                                "ChannelName": "train"
                            },
                            {
                                "DataSource": {
                                    "S3DataSource": {
                                        "S3DataType": "S3Prefix",
                                        "S3Uri": "s3://${PipelineBucketName}/data/test_data",
                                        "S3DataDistributionType": "FullyReplicated"
                                    }
                                },
                                "ContentType": "text/csv",
                                "ChannelName": "validation"
                            }
                        ],
                        "TrainingJobName.$": "$$.Execution.Input['TrainingJobName']",
                        "DebugHookConfig": {
                            "S3OutputPath": "s3://${PipelineBucketName}/debug",
                            "HookParameters": {
                                "save_interval": "5",
                                "include_regex": ".*"
                            },
                            "CollectionConfigurations": [
                                {
                                    "CollectionName": "metrics"
                                },
                                {
                                    "CollectionName": "feature_importance"
                                },
                                {
                                    "CollectionName": "full_shap"
                                },
                                {
                                    "CollectionName": "average_shap"
                                }
                            ]
                        },
                        "DebugRuleConfigurations": [
                            {
                                "RuleConfigurationName": "LossNotDecreasing",
                                "RuleEvaluatorImage": "${DebuggerImageId}.dkr.ecr.${AWS::Region}.amazonaws.com/sagemaker-debugger-rules:latest",
                                "RuleParameters": {
                                    "rule_to_invoke": "LossNotDecreasing",
                                    "collection_names": "metrics",
                                    "num_steps": "10"
                                }
                            }
                        ],
                        "HyperParameters.$": "$"
                    },
                    "Type": "Task",
                    "Next": "SageMaker Step Save Model",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Save Model": {
                    "Parameters": {
                        "ExecutionRoleArn": "arn:aws:iam::${AWS::AccountId}:role/service-role/AmazonSageMaker-ExecutionRole-TrainingInferencePipeline",
                        "ModelName.$": "$$.Execution.Input['ModelName']",
                        "PrimaryContainer": {
                            "Environment": {},
                            "Image": "${XgbImageID}.dkr.ecr.${AWS::Region}.amazonaws.com/sagemaker-xgboost:1.2-1",
                            "ModelDataUrl.$": "$['ModelArtifacts']['S3ModelArtifacts']"
                        }
                    },
                    "Resource": "arn:aws:states:::sagemaker:createModel",
                    "Type": "Task",
                    "Next": "SageMaker Step Get Model Url",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Get Model Url": {
                    "Parameters": {
                        "FunctionName": "${LambdaFunctionGetModelData}",
                        "Payload": {
                            "TrainingJobName.$": "$"
                        }
                    },
                    "OutputPath": "$.Payload.body",
                    "Resource": "arn:aws:states:::lambda:invoke",
                    "Type": "Task",
                    "Next": "SageMaker Step Model Explainability",
                    "Catch": [
                        {
                            "ErrorEquals": [
                                "States.TaskFailed"
                            ],
                            "Next": "ML Workflow failed"
                        }
                    ]
                },
                "SageMaker Step Model Explainability": {
                    "Resource": "arn:aws:states:::sagemaker:createProcessingJob.sync",
                    "Parameters": {
                        "ProcessingJobName.$": "$$.Execution.Input['EvaluationProcessingJobName']",
                        "ProcessingInputs": [
                            {
                                "InputName": "train_data",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri": "s3://${PipelineBucketName}/data/train_data",
                                    "LocalPath": "/opt/ml/processing/train",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "test_data",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri": "s3://${PipelineBucketName}/data/test_data",
                                    "LocalPath": "/opt/ml/processing/test",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "model",
                                "AppManaged": false,
                                "S3Input": {
                                    "S3Uri.$": "$['modelDataUrl']",
                                    "LocalPath": "/opt/ml/processing/model",
                                    "S3DataType": "S3Prefix",
                                    "S3InputMode": "File",
                                    "S3DataDistributionType": "FullyReplicated",
                                    "S3CompressionType": "None"
                                }
                            },
                            {
                                "InputName": "code",
                                "AppManaged": false,
                                "S3Input": {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



