How to search for Amazon SageMaker Models using Tags?

1

When I open the Model details in the Amazon SageMaker console, the details clearly show Tags that have been added to the model during it's creation.

| Tags | | Key | | sagemaker:project-name | | aws:cloudformation:stack-name| | sagemaker:deployment-stage| | sagemaker:deployment-stage|

But the Search API provided by Amazon SageMaker, https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html

mentions only the following resources can be searched for using Tags: Valid Values: TrainingJob | Experiment | ExperimentTrial | ExperimentTrialComponent | Endpoint | ModelPackage | ModelPackageGroup | Pipeline | PipelineExecution | FeatureGroup | Project | FeatureMetadata

I wish to obtain Model details, not the ModelPackageGroup/ModelPackage details, using Tags so if there is a way to do that, please share. Also if there is no way to obtain it using Tags, like the Search API Documentation suggests, what is the purpose of the Tags still present in the Model details?

2 個答案
0

DescribeModel will provide information about model details, the tags in the model was created as a part of the CloudFormation deployment. It identify each resources by CF.

To search by tags, you could add custom tags for your purpose.

AWS
Jady
已回答 2 年前
  • Thank you for replying! Even if I add custom tags, the resource: 'Model' is not accepted by the search API. (An error occurred (ValidationException) when calling the Search operation: 1 validation error detected: Value 'Model' at 'resource' failed to satisfy constraint: Member must satisfy enum value set: [Pipeline, ModelPackageGroup, TrainingJob, ExperimentTrialComponent, FeatureMetadata, FeatureGroup, ProcessingJob, TransformJob, BulkFeatureMetadata, Endpoint, PipelineExecution, Project, ExperimentTrial, Image, ImageVersion, Experiment, ModelPackage])

0

To use custom tag, you will need to search by GetResources from AWS Resource Groups: https://docs.aws.amazon.com/ARG/latest/userguide/find-resources-to-tag.html

AWS
Jady
已回答 2 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南