How to register a multi container model to a model registry?
I have created a multi-container model in SageMaker notebook and deployed it through an endpoint. But while attempting to do the same through a SageMaker Studio Project (build, train and deploy model template), I need to register the multi-container model through a 'sagemaker.workflow.step_collections.RegisterModel' step, which I am unable to do. What I understand till now is multi-container model is created through boto3 api call. I haven't found a way to create it using 'sagemaker.model.Model' and hence not being able to register it. Please help.
Hi,
in order to register a multi-container model you need to use the PipelineModel class instead of the Model one you are trying to do currently.
An example of this can be found in this notebook: https://github.com/aws/amazon-sagemaker-examples/blob/main/sagemaker-pipelines/tabular/train-register-deploy-pipeline-model/train%20register%20and%20deploy%20a%20pipeline%20model.ipynb
In this example a pipeline model is created with 2 containers, first one is an sklearn one doing some preprocessing and the second an XGBoost one for ML inference. However, in your case, the number or containers, type, invocation order and more, may differ, but you should be able to draw parallels based on this example.
Hope this helps,
Relevant questions
Redshift ML / SageMaker - Deploy an existing model artifact to a Redshift Cluster
Accepted Answerasked a year agoTracking the lineage between Amazon SageMaker endpoint model and Model Monitor captured data
Accepted AnswerSageMaker Multi Model endpoint creation fails while creating for model built on container sagemaker-scikit-learn:0.23-1-cpu-py3
asked a month agoSageMaker Model Registry - how to set the Stage column of a Model Package?
asked 7 months agoExporting Sagemaker model to local computer
asked 3 months agoSageMaker Multi Model EndPoint and Inference Data Capture feature
Accepted Answerasked 3 months agoAccessing SageMaker model after registering it
Accepted Answerasked 4 months agoBatch deployment from model registry
asked 19 days agoCall last Sagemaker Model in Batch Transform Jobs
asked 19 days agoHow to register a multi container model to a model registry?
asked 12 days ago
Thank you for the answer. Please correct me if I'm wrong but in case of an inference pipeline using a PipelineModel class, the models are run serially and the output of the first model goes in as input of second model. What I'm trying to achieve is through invoking the same endpoint, I want to retrieve output from a sentiment prediction model and an intent recognition model.