pipelines/samples/contrib/aws-samples
rd-pong d50d178936
chore(components): Add sample for Sagemaker Model Monitor component (#9405)
* Add sample pipeline for hosting and model monitor

* Update sample pipeline doc

* Address comments
2023-05-15 23:22:59 +00:00
..
ground_truth_pipeline_demo refactor(components): AWS SageMaker - Full component refactoring (#4336) 2020-10-27 14:17:57 -07:00
hosting_model_monitor_pipeline chore(components): Add sample for Sagemaker Model Monitor component (#9405) 2023-05-15 23:22:59 +00:00
mnist-kmeans-sagemaker chore(components): Update Sagemaker sample to use v2 Hosting components (#9398) 2023-05-12 22:27:28 +00:00
rlestimator_pipeline feat(components) Adds RoboMaker and SageMaker RLEstimator components (#4813) 2020-12-11 13:27:27 -08:00
robomaker_simulation feat(components) Adds RoboMaker and SageMaker RLEstimator components (#4813) 2020-12-11 13:27:27 -08:00
sagemaker_debugger_demo refactor(components): AWS SageMaker - Full component refactoring (#4336) 2020-10-27 14:17:57 -07:00
simple_train_pipeline chore: add missing imports for aws samples data scripts (#7877) 2022-07-07 22:33:51 +00:00
titanic-survival-prediction refactor(components): AWS SageMaker - Full component refactoring (#4336) 2020-10-27 14:17:57 -07:00
OWNERS chore(components): Update aws owners files to reflect current owners (#8622) 2022-12-22 22:29:14 +00:00
README.md chore(components): Add sample for Sagemaker Model Monitor component (#9405) 2023-05-15 23:22:59 +00:00

README.md

Sample AWS SageMaker Kubeflow Pipelines

This folder contains many example pipelines which use AWS SageMaker Components for KFP. The following sections explain the setup needed to run these pipelines. Once you are done with the setup, simple_train_pipeline is a good place to start if you have never used these components before.

Prerequisites

You need a cluster with Kubeflow Pipelines installed and permissions configured. Kubeflow Pipelines offers two installation options. Select the option that applies to your use case:

Full Kubeflow on AWS Deployment

  1. To use other Kubeflow components in addition to Kubeflow Pipelines, install the AWS Distribution of Kubeflow..

  2. Configure permissions to access SageMaker services by following the guide on Kubeflow on AWS documentation

Standalone Kubeflow Pipelines Deployment

  1. Install Kubeflow Pipelines standalone by following the documentation on SageMaker developer guide.

  2. Configure permissions to access SageMaker services by following the guide on SageMaker developer guide

Inputs to the pipeline

SageMaker execution role

Note: Ignore this section if you plan to run titanic-survival-prediction example

This role is used by SageMaker jobs created by the KFP to access the S3 buckets and other AWS resources. Run these commands to create the sagemaker-execution-role.
Note down the Role ARN. You need to give this Role ARN as input in pipeline.

TRUST="{ \"Version\": \"2012-10-17\", \"Statement\": [ { \"Effect\": \"Allow\", \"Principal\": { \"Service\": \"sagemaker.amazonaws.com\" }, \"Action\": \"sts:AssumeRole\" } ] }"
aws iam create-role --role-name kfp-example-sagemaker-execution-role --assume-role-policy-document "$TRUST"
aws iam attach-role-policy --role-name kfp-example-sagemaker-execution-role --policy-arn arn:aws:iam::aws:policy/AmazonSageMakerFullAccess
aws iam attach-role-policy --role-name kfp-example-sagemaker-execution-role --policy-arn arn:aws:iam::aws:policy/AmazonS3FullAccess
aws iam get-role --role-name kfp-example-sagemaker-execution-role --output text --query 'Role.Arn'

# note down the Role ARN or export to env variable.
export SAGEMAKER_EXECUTION_ROLE_ARN=$(aws iam get-role --role-name kfp-example-sagemaker-execution-role --output text --query 'Role.Arn')
echo $SAGEMAKER_EXECUTION_ROLE_ARN