pipelines/components/aws/sagemaker/Modelv2
rd-pong 29444f905c
feat(components): SageMaker V2 model monitor component release (#9368)
* Generate using updated generator

* Update license version

* Update container image version

* Update Changelog.md

* Update changelog

* Update Changelog.md
2023-05-09 22:26:42 +00:00
..
src feat(components): SageMaker V2 model monitor component release (#9368) 2023-05-09 22:26:42 +00:00
README.md fix(components): Changing path for model (#9331) 2023-05-05 00:45:23 +00:00
component.yaml feat(components): SageMaker V2 model monitor component release (#9368) 2023-05-09 22:26:42 +00:00

README.md

SageMaker Model Kubeflow Pipelines component v2

Overview

Model is one of the three components(along with Endpoint and EndpointConfig) you would use to create a Hosting deployment on Sagemaker.

Component to create SageMaker Models in a Kubeflow Pipelines workflow.

See the SageMaker Components for Kubeflow Pipelines versions section in SageMaker Components for Kubeflow Pipelines to learn about the differences between the version 1 and version 2 components.

Kubeflow Pipelines backend compatibility

SageMaker components are currently supported with Kubeflow pipelines backend v1. This means, you will have to use KFP sdk 1.8.x to create your pipelines.

Getting Started

Follow this guide to setup the prerequisites for Model depending on your deployment.

Inputs Parameters

Find the high level component input parameters and their description in the component's input specification. The parameters with JsonObject or JsonArray type inputs have nested fields, you will have to refer to the TrainingJob CRD specification for the respective structure and pass the input in JSON format.

A quick way to see the converted JSON style input is to copy the sample Model spec and convert it to JSON using a YAML to JSON converter like this website.

For e.g. the primaryContainer in the Model CRD looks like:

primaryContainer: 
  containerHostname: string
  environment: {}
  image: string
  imageConfig: 
    repositoryAccessMode: string
    repositoryAuthConfig: 
      repositoryCredentialsProviderARN: string
  inferenceSpecificationName: string
  mode: string
  modelDataURL: string
  modelPackageName: string
  multiModelConfig: 
    modelCacheSetting: string

The primaryContainer input for the component would be (not all parameters are included):

primaryContainer = {
    "containerHostname": "xgboost",
    "environment": {"my_env_key": "my_env_value"},
    "image": "257758044811.dkr.ecr.us-east-2.amazonaws.com/sagemaker-xgboost:0.90-1-cpu-py3",
    "modelDataURL": "s3://<path to model>",
    "modelPackageName": "SingleModel",
}

You might also want to look at the Model API reference for a detailed explaination of parameters.

References