SageMaker / Paginator / Search
Search#
- class SageMaker.Paginator.Search#
- paginator = client.get_paginator('search') - paginate(**kwargs)#
- Creates an iterator that will paginate through responses from - SageMaker.Client.search().- See also: AWS API Documentation - Request Syntax- response_iterator = paginator.paginate( Resource='TrainingJob'|'Experiment'|'ExperimentTrial'|'ExperimentTrialComponent'|'Endpoint'|'ModelPackage'|'ModelPackageGroup'|'Pipeline'|'PipelineExecution'|'FeatureGroup'|'Project'|'FeatureMetadata'|'HyperParameterTuningJob'|'ModelCard'|'Model', SearchExpression={ 'Filters': [ { 'Name': 'string', 'Operator': 'Equals'|'NotEquals'|'GreaterThan'|'GreaterThanOrEqualTo'|'LessThan'|'LessThanOrEqualTo'|'Contains'|'Exists'|'NotExists'|'In', 'Value': 'string' }, ], 'NestedFilters': [ { 'NestedPropertyName': 'string', 'Filters': [ { 'Name': 'string', 'Operator': 'Equals'|'NotEquals'|'GreaterThan'|'GreaterThanOrEqualTo'|'LessThan'|'LessThanOrEqualTo'|'Contains'|'Exists'|'NotExists'|'In', 'Value': 'string' }, ] }, ], 'SubExpressions': [ {'... recursive ...'}, ], 'Operator': 'And'|'Or' }, SortBy='string', SortOrder='Ascending'|'Descending', CrossAccountFilterOption='SameAccount'|'CrossAccount', PaginationConfig={ 'MaxItems': 123, 'PageSize': 123, 'StartingToken': 'string' } ) - Parameters:
- Resource (string) – - [REQUIRED] - The name of the SageMaker resource to search for. 
- SearchExpression (dict) – - A Boolean conditional statement. Resources must satisfy this condition to be included in search results. You must provide at least one subexpression, filter, or nested filter. The maximum number of recursive - SubExpressions,- NestedFilters, and- Filtersthat can be included in a- SearchExpressionobject is 50.- Filters (list) – - A list of filter objects. - (dict) – - A conditional statement for a search expression that includes a resource property, a Boolean operator, and a value. Resources that match the statement are returned in the results from the Search API. - If you specify a - Value, but not an- Operator, SageMaker uses the equals operator.- In search, there are several property types: - Metrics - To define a metric filter, enter a value using the form - "Metrics.<name>", where- <name>is a metric name. For example, the following filter searches for training jobs with an- "accuracy"metric greater than- "0.9":- {- "Name": "Metrics.accuracy",- "Operator": "GreaterThan",- "Value": "0.9"- }- HyperParameters - To define a hyperparameter filter, enter a value with the form - "HyperParameters.<name>". Decimal hyperparameter values are treated as a decimal in a comparison if the specified- Valueis also a decimal value. If the specified- Valueis an integer, the decimal hyperparameter values are treated as integers. For example, the following filter is satisfied by training jobs with a- "learning_rate"hyperparameter that is less than- "0.5":- {- "Name": "HyperParameters.learning_rate",- "Operator": "LessThan",- "Value": "0.5"- }- Tags - To define a tag filter, enter a value with the form - Tags.<key>.- Name (string) – [REQUIRED] - A resource property name. For example, - TrainingJobName. For valid property names, see SearchRecord. You must specify a valid property for the resource.
- Operator (string) – - A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the following values: - Equals - The value of - Nameequals- Value.- NotEquals - The value of - Namedoesn’t equal- Value.- Exists - The - Nameproperty exists.- NotExists - The - Nameproperty does not exist.- GreaterThan - The value of - Nameis greater than- Value. Not supported for text properties.- GreaterThanOrEqualTo - The value of - Nameis greater than or equal to- Value. Not supported for text properties.- LessThan - The value of - Nameis less than- Value. Not supported for text properties.- LessThanOrEqualTo - The value of - Nameis less than or equal to- Value. Not supported for text properties.- In - The value of - Nameis one of the comma delimited strings in- Value. Only supported for text properties.- Contains - The value of - Namecontains the string- Value. Only supported for text properties.- A - SearchExpressioncan include the- Containsoperator multiple times when the value of- Nameis one of the following:- Experiment.DisplayName
- Experiment.ExperimentName
- Experiment.Tags
- Trial.DisplayName
- Trial.TrialName
- Trial.Tags
- TrialComponent.DisplayName
- TrialComponent.TrialComponentName
- TrialComponent.Tags
- TrialComponent.InputArtifacts
- TrialComponent.OutputArtifacts
 - A - SearchExpressioncan include only one- Containsoperator for all other values of- Name. In these cases, if you include multiple- Containsoperators in the- SearchExpression, the result is the following error message: “- 'CONTAINS' operator usage limit of 1 exceeded.”
- Value (string) – - A value used with - Nameand- Operatorto determine which resources satisfy the filter’s condition. For numerical properties,- Valuemust be an integer or floating-point decimal. For timestamp properties,- Valuemust be an ISO 8601 date-time string of the following format:- YYYY-mm-dd'T'HH:MM:SS.
 
 
- NestedFilters (list) – - A list of nested filter objects. - (dict) – - A list of nested Filter objects. A resource must satisfy the conditions of all filters to be included in the results returned from the Search API. - For example, to filter on a training job’s - InputDataConfigproperty with a specific channel name and- S3Uriprefix, define the following filters:- '{Name:"InputDataConfig.ChannelName", "Operator":"Equals", "Value":"train"}',
- '{Name:"InputDataConfig.DataSource.S3DataSource.S3Uri", "Operator":"Contains", "Value":"mybucket/catdata"}'
 - NestedPropertyName (string) – [REQUIRED] - The name of the property to use in the nested filters. The value must match a listed property name, such as - InputDataConfig.
- Filters (list) – [REQUIRED] - A list of filters. Each filter acts on a property. Filters must contain at least one - Filtersvalue. For example, a- NestedFilterscall might include a filter on the- PropertyNameparameter of the- InputDataConfigproperty:- InputDataConfig.DataSource.S3DataSource.S3Uri.- (dict) – - A conditional statement for a search expression that includes a resource property, a Boolean operator, and a value. Resources that match the statement are returned in the results from the Search API. - If you specify a - Value, but not an- Operator, SageMaker uses the equals operator.- In search, there are several property types: - Metrics - To define a metric filter, enter a value using the form - "Metrics.<name>", where- <name>is a metric name. For example, the following filter searches for training jobs with an- "accuracy"metric greater than- "0.9":- {- "Name": "Metrics.accuracy",- "Operator": "GreaterThan",- "Value": "0.9"- }- HyperParameters - To define a hyperparameter filter, enter a value with the form - "HyperParameters.<name>". Decimal hyperparameter values are treated as a decimal in a comparison if the specified- Valueis also a decimal value. If the specified- Valueis an integer, the decimal hyperparameter values are treated as integers. For example, the following filter is satisfied by training jobs with a- "learning_rate"hyperparameter that is less than- "0.5":- {- "Name": "HyperParameters.learning_rate",- "Operator": "LessThan",- "Value": "0.5"- }- Tags - To define a tag filter, enter a value with the form - Tags.<key>.- Name (string) – [REQUIRED] - A resource property name. For example, - TrainingJobName. For valid property names, see SearchRecord. You must specify a valid property for the resource.
- Operator (string) – - A Boolean binary operator that is used to evaluate the filter. The operator field contains one of the following values: - Equals - The value of - Nameequals- Value.- NotEquals - The value of - Namedoesn’t equal- Value.- Exists - The - Nameproperty exists.- NotExists - The - Nameproperty does not exist.- GreaterThan - The value of - Nameis greater than- Value. Not supported for text properties.- GreaterThanOrEqualTo - The value of - Nameis greater than or equal to- Value. Not supported for text properties.- LessThan - The value of - Nameis less than- Value. Not supported for text properties.- LessThanOrEqualTo - The value of - Nameis less than or equal to- Value. Not supported for text properties.- In - The value of - Nameis one of the comma delimited strings in- Value. Only supported for text properties.- Contains - The value of - Namecontains the string- Value. Only supported for text properties.- A - SearchExpressioncan include the- Containsoperator multiple times when the value of- Nameis one of the following:- Experiment.DisplayName
- Experiment.ExperimentName
- Experiment.Tags
- Trial.DisplayName
- Trial.TrialName
- Trial.Tags
- TrialComponent.DisplayName
- TrialComponent.TrialComponentName
- TrialComponent.Tags
- TrialComponent.InputArtifacts
- TrialComponent.OutputArtifacts
 - A - SearchExpressioncan include only one- Containsoperator for all other values of- Name. In these cases, if you include multiple- Containsoperators in the- SearchExpression, the result is the following error message: “- 'CONTAINS' operator usage limit of 1 exceeded.”
- Value (string) – - A value used with - Nameand- Operatorto determine which resources satisfy the filter’s condition. For numerical properties,- Valuemust be an integer or floating-point decimal. For timestamp properties,- Valuemust be an ISO 8601 date-time string of the following format:- YYYY-mm-dd'T'HH:MM:SS.
 
 
 
 
- SubExpressions (list) – - A list of search expression objects. - (dict) – - A multi-expression that searches for the specified resource or resources in a search. All resource objects that satisfy the expression’s condition are included in the search results. You must specify at least one subexpression, filter, or nested filter. A - SearchExpressioncan contain up to twenty elements.- A - SearchExpressioncontains the following components:- A list of - Filterobjects. Each filter defines a simple Boolean expression comprised of a resource property name, Boolean operator, and value.
- A list of - NestedFilterobjects. Each nested filter defines a list of Boolean expressions using a list of resource properties. A nested filter is satisfied if a single object in the list satisfies all Boolean expressions.
- A list of - SearchExpressionobjects. A search expression object can be nested in a list of search expression objects.
- A Boolean operator: - Andor- Or.
 
 
- Operator (string) – - A Boolean operator used to evaluate the search expression. If you want every conditional statement in all lists to be satisfied for the entire search expression to be true, specify - And. If only a single conditional statement needs to be true for the entire search expression to be true, specify- Or. The default value is- And.
 
- SortBy (string) – The name of the resource property used to sort the - SearchResults. The default is- LastModifiedTime.
- SortOrder (string) – How - SearchResultsare ordered. Valid values are- Ascendingor- Descending. The default is- Descending.
- CrossAccountFilterOption (string) – A cross account filter option. When the value is - "CrossAccount"the search results will only include resources made discoverable to you from other accounts. When the value is- "SameAccount"or- nullthe search results will only include resources from your account. Default is- null. For more information on searching for resources made discoverable to your account, see Search discoverable resources in the SageMaker Developer Guide. The maximum number of ``ResourceCatalog``s viewable is 1000.
- PaginationConfig (dict) – - A dictionary that provides parameters to control pagination. - MaxItems (integer) – - The total number of items to return. If the total number of items available is more than the value specified in max-items then a - NextTokenwill be provided in the output that you can use to resume pagination.
- PageSize (integer) – - The size of each page. 
- StartingToken (string) – - A token to specify where to start paginating. This is the - NextTokenfrom a previous response.
 
 
- Return type:
- dict 
- Returns:
 - Response Syntax- # This section is too large to render. # Please see the AWS API Documentation linked below. - Response Structure- # This section is too large to render. # Please see the AWS API Documentation linked below.