2023/09/28 - Amazon SageMaker Service - 4 updated api methods
Changes Online store feature groups supports Standard and InMemory tier storage types for low latency storage for real-time data retrieval. The InMemory tier supports collection types List, Set, and Vector.
{'FeatureDefinitions': {'CollectionConfig': {'VectorConfig': {'Dimension': 'integer'}}, 'CollectionType': 'List | Set | Vector'}, 'OnlineStoreConfig': {'StorageType': 'Standard | InMemory'}}
Create a new FeatureGroup . A FeatureGroup is a group of Features defined in the FeatureStore to describe a Record .
The FeatureGroup defines the schema and features contained in the FeatureGroup. A FeatureGroup definition is composed of a list of Features , a RecordIdentifierFeatureName , an EventTimeFeatureName and configurations for its OnlineStore and OfflineStore . Check Amazon Web Services service quotas to see the FeatureGroup s quota for your Amazon Web Services account.
Warning
You must include at least one of OnlineStoreConfig and OfflineStoreConfig to create a FeatureGroup .
See also: AWS API Documentation
Request Syntax
client.create_feature_group( FeatureGroupName='string', RecordIdentifierFeatureName='string', EventTimeFeatureName='string', FeatureDefinitions=[ { 'FeatureName': 'string', 'FeatureType': 'Integral'|'Fractional'|'String', 'CollectionType': 'List'|'Set'|'Vector', 'CollectionConfig': { 'VectorConfig': { 'Dimension': 123 } } }, ], OnlineStoreConfig={ 'SecurityConfig': { 'KmsKeyId': 'string' }, 'EnableOnlineStore': True|False, 'TtlDuration': { 'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks', 'Value': 123 }, 'StorageType': 'Standard'|'InMemory' }, OfflineStoreConfig={ 'S3StorageConfig': { 'S3Uri': 'string', 'KmsKeyId': 'string', 'ResolvedOutputS3Uri': 'string' }, 'DisableGlueTableCreation': True|False, 'DataCatalogConfig': { 'TableName': 'string', 'Catalog': 'string', 'Database': 'string' }, 'TableFormat': 'Glue'|'Iceberg' }, RoleArn='string', Description='string', Tags=[ { 'Key': 'string', 'Value': 'string' }, ] )
string
[REQUIRED]
The name of the FeatureGroup . The name must be unique within an Amazon Web Services Region in an Amazon Web Services account. The name:
Must start and end with an alphanumeric character.
Can only contain alphanumeric character and hyphens. Spaces are not allowed.
string
[REQUIRED]
The name of the Feature whose value uniquely identifies a Record defined in the FeatureStore . Only the latest record per identifier value will be stored in the OnlineStore . RecordIdentifierFeatureName must be one of feature definitions' names.
You use the RecordIdentifierFeatureName to access data in a FeatureStore .
This name:
Must start and end with an alphanumeric character.
Can only contains alphanumeric characters, hyphens, underscores. Spaces are not allowed.
string
[REQUIRED]
The name of the feature that stores the EventTime of a Record in a FeatureGroup .
An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup . All Records in the FeatureGroup must have a corresponding EventTime .
An EventTime can be a String or Fractional .
Fractional : EventTime feature values must be a Unix timestamp in seconds.
String : EventTime feature values must be an ISO-8601 string in the format. The following formats are supported yyyy-MM-dd'T'HH:mm:ssZ and yyyy-MM-dd'T'HH:mm:ss.SSSZ where yyyy , MM , and dd represent the year, month, and day respectively and HH , mm , ss , and if applicable, SSS represent the hour, month, second and milliseconds respsectively. 'T' and Z are constants.
list
[REQUIRED]
A list of Feature names and types. Name and Type is compulsory per Feature .
Valid feature FeatureType s are Integral , Fractional and String .
FeatureName s cannot be any of the following: is_deleted , write_time , api_invocation_time
You can create up to 2,500 FeatureDefinition s per FeatureGroup .
(dict) --
A list of features. You must include FeatureName and FeatureType . Valid feature FeatureType s are Integral , Fractional and String .
FeatureName (string) --
The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted , write_time , api_invocation_time .
FeatureType (string) --
The value type of a feature. Valid values are Integral, Fractional, or String.
CollectionType (string) --
A grouping of elements where each element within the collection must have the same feature type ( String , Integral , or Fractional ).
List : An ordered collection of elements.
Set : An unordered collection of unique elements.
Vector : A specialized list that represents a fixed-size array of elements. The vector dimension is determined by you. Must have elements with fractional feature types.
CollectionConfig (dict) --
Configuration for your collection.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set: VectorConfig.
VectorConfig (dict) --
Configuration for your vector collection type.
Dimension : The number of elements in your vector.
Dimension (integer) -- [REQUIRED]
The number of elements in your vector.
dict
You can turn the OnlineStore on or off by specifying True for the EnableOnlineStore flag in OnlineStoreConfig .
You can also include an Amazon Web Services KMS key ID ( KMSKeyId ) for at-rest encryption of the OnlineStore .
The default value is False .
SecurityConfig (dict) --
Use to specify KMS Key ID ( KMSKeyId ) for at-rest encryption of your OnlineStore .
KmsKeyId (string) --
The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.
The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId :
"kms:Encrypt"
"kms:Decrypt"
"kms:DescribeKey"
"kms:CreateGrant"
"kms:RetireGrant"
"kms:ReEncryptFrom"
"kms:ReEncryptTo"
"kms:GenerateDataKey"
"kms:ListAliases"
"kms:ListGrants"
"kms:RevokeGrant"
The caller (either user or IAM role) to all DataPlane operations ( PutRecord , GetRecord , DeleteRecord ) must have the following permissions to the KmsKeyId :
"kms:Decrypt"
EnableOnlineStore (boolean) --
Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag.
The default value is False .
TtlDuration (dict) --
Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration . For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.
Unit (string) --
TtlDuration time unit.
Value (integer) --
TtlDuration time value.
StorageType (string) --
Option for different tiers of low latency storage for real-time data retrieval.
Standard : A managed low latency data store for feature groups.
InMemory : A managed data store for feature groups that supports very low latency retrieval.
dict
Use this to configure an OfflineFeatureStore . This parameter allows you to specify:
The Amazon Simple Storage Service (Amazon S3) location of an OfflineStore .
A configuration for an Amazon Web Services Glue or Amazon Web Services Hive data catalog.
An KMS encryption key to encrypt the Amazon S3 location used for OfflineStore . If KMS encryption key is not specified, by default we encrypt all data at rest using Amazon Web Services KMS key. By defining your bucket-level key for SSE, you can reduce Amazon Web Services KMS requests costs by up to 99 percent.
Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg.
To learn more about this parameter, see OfflineStoreConfig.
S3StorageConfig (dict) -- [REQUIRED]
The Amazon Simple Storage (Amazon S3) location of OfflineStore .
S3Uri (string) -- [REQUIRED]
The S3 URI, or location in Amazon S3, of OfflineStore .
S3 URIs have a format similar to the following: s3://example-bucket/prefix/ .
KmsKeyId (string) --
The Amazon Web Services Key Management Service (KMS) key ARN of the key used to encrypt any objects written into the OfflineStore S3 location.
The IAM roleARN that is passed as a parameter to CreateFeatureGroup must have below permissions to the KmsKeyId :
"kms:GenerateDataKey"
ResolvedOutputS3Uri (string) --
The S3 path where offline records are written.
DisableGlueTableCreation (boolean) --
Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore . If set to False , Feature Store will name the OfflineStore Glue table following Athena's naming recommendations.
The default value is False .
DataCatalogConfig (dict) --
The meta data of the Glue table that is autogenerated when an OfflineStore is created.
TableName (string) -- [REQUIRED]
The name of the Glue table.
Catalog (string) -- [REQUIRED]
The name of the Glue table catalog.
Database (string) -- [REQUIRED]
The name of the Glue table database.
TableFormat (string) --
Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg.
string
The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided.
string
A free-form description of a FeatureGroup .
list
Tags used to identify Features in each FeatureGroup .
(dict) --
A tag object that consists of a key and an optional value, used to manage metadata for SageMaker Amazon Web Services resources.
You can add tags to notebook instances, training jobs, hyperparameter tuning jobs, batch transform jobs, models, labeling jobs, work teams, endpoint configurations, and endpoints. For more information on adding tags to SageMaker resources, see AddTags.
For more information on adding metadata to your Amazon Web Services resources with tagging, see Tagging Amazon Web Services resources. For advice on best practices for managing Amazon Web Services resources with tagging, see Tagging Best Practices: Implement an Effective Amazon Web Services Resource Tagging Strategy.
Key (string) -- [REQUIRED]
The tag key. Tag keys must be unique per resource.
Value (string) -- [REQUIRED]
The tag value.
dict
Response Syntax
{ 'FeatureGroupArn': 'string' }
Response Structure
(dict) --
FeatureGroupArn (string) --
The Amazon Resource Name (ARN) of the FeatureGroup . This is a unique identifier for the feature group.
{'FeatureDefinitions': {'CollectionConfig': {'VectorConfig': {'Dimension': 'integer'}}, 'CollectionType': 'List | Set | Vector'}, 'OnlineStoreConfig': {'StorageType': 'Standard | InMemory'}}
Use this operation to describe a FeatureGroup . The response includes information on the creation time, FeatureGroup name, the unique identifier for each FeatureGroup , and more.
See also: AWS API Documentation
Request Syntax
client.describe_feature_group( FeatureGroupName='string', NextToken='string' )
string
[REQUIRED]
The name or Amazon Resource Name (ARN) of the FeatureGroup you want described.
string
A token to resume pagination of the list of Features ( FeatureDefinitions ). 2,500 Features are returned by default.
dict
Response Syntax
{ 'FeatureGroupArn': 'string', 'FeatureGroupName': 'string', 'RecordIdentifierFeatureName': 'string', 'EventTimeFeatureName': 'string', 'FeatureDefinitions': [ { 'FeatureName': 'string', 'FeatureType': 'Integral'|'Fractional'|'String', 'CollectionType': 'List'|'Set'|'Vector', 'CollectionConfig': { 'VectorConfig': { 'Dimension': 123 } } }, ], 'CreationTime': datetime(2015, 1, 1), 'LastModifiedTime': datetime(2015, 1, 1), 'OnlineStoreConfig': { 'SecurityConfig': { 'KmsKeyId': 'string' }, 'EnableOnlineStore': True|False, 'TtlDuration': { 'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks', 'Value': 123 }, 'StorageType': 'Standard'|'InMemory' }, 'OfflineStoreConfig': { 'S3StorageConfig': { 'S3Uri': 'string', 'KmsKeyId': 'string', 'ResolvedOutputS3Uri': 'string' }, 'DisableGlueTableCreation': True|False, 'DataCatalogConfig': { 'TableName': 'string', 'Catalog': 'string', 'Database': 'string' }, 'TableFormat': 'Glue'|'Iceberg' }, 'RoleArn': 'string', 'FeatureGroupStatus': 'Creating'|'Created'|'CreateFailed'|'Deleting'|'DeleteFailed', 'OfflineStoreStatus': { 'Status': 'Active'|'Blocked'|'Disabled', 'BlockedReason': 'string' }, 'LastUpdateStatus': { 'Status': 'Successful'|'Failed'|'InProgress', 'FailureReason': 'string' }, 'FailureReason': 'string', 'Description': 'string', 'NextToken': 'string', 'OnlineStoreTotalSizeBytes': 123 }
Response Structure
(dict) --
FeatureGroupArn (string) --
The Amazon Resource Name (ARN) of the FeatureGroup .
FeatureGroupName (string) --
he name of the FeatureGroup .
RecordIdentifierFeatureName (string) --
The name of the Feature used for RecordIdentifier , whose value uniquely identifies a record stored in the feature store.
EventTimeFeatureName (string) --
The name of the feature that stores the EventTime of a Record in a FeatureGroup .
An EventTime is a point in time when a new event occurs that corresponds to the creation or update of a Record in a FeatureGroup . All Records in the FeatureGroup have a corresponding EventTime .
FeatureDefinitions (list) --
A list of the Features in the FeatureGroup . Each feature is defined by a FeatureName and FeatureType .
(dict) --
A list of features. You must include FeatureName and FeatureType . Valid feature FeatureType s are Integral , Fractional and String .
FeatureName (string) --
The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted , write_time , api_invocation_time .
FeatureType (string) --
The value type of a feature. Valid values are Integral, Fractional, or String.
CollectionType (string) --
A grouping of elements where each element within the collection must have the same feature type ( String , Integral , or Fractional ).
List : An ordered collection of elements.
Set : An unordered collection of unique elements.
Vector : A specialized list that represents a fixed-size array of elements. The vector dimension is determined by you. Must have elements with fractional feature types.
CollectionConfig (dict) --
Configuration for your collection.
Note
This is a Tagged Union structure. Only one of the following top level keys will be set: VectorConfig. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:
'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
VectorConfig (dict) --
Configuration for your vector collection type.
Dimension : The number of elements in your vector.
Dimension (integer) --
The number of elements in your vector.
CreationTime (datetime) --
A timestamp indicating when SageMaker created the FeatureGroup .
LastModifiedTime (datetime) --
A timestamp indicating when the feature group was last updated.
OnlineStoreConfig (dict) --
The configuration for the OnlineStore .
SecurityConfig (dict) --
Use to specify KMS Key ID ( KMSKeyId ) for at-rest encryption of your OnlineStore .
KmsKeyId (string) --
The Amazon Web Services Key Management Service (KMS) key ARN that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.
The caller (either user or IAM role) of CreateFeatureGroup must have below permissions to the OnlineStore KmsKeyId :
"kms:Encrypt"
"kms:Decrypt"
"kms:DescribeKey"
"kms:CreateGrant"
"kms:RetireGrant"
"kms:ReEncryptFrom"
"kms:ReEncryptTo"
"kms:GenerateDataKey"
"kms:ListAliases"
"kms:ListGrants"
"kms:RevokeGrant"
The caller (either user or IAM role) to all DataPlane operations ( PutRecord , GetRecord , DeleteRecord ) must have the following permissions to the KmsKeyId :
"kms:Decrypt"
EnableOnlineStore (boolean) --
Turn OnlineStore off by specifying False for the EnableOnlineStore flag. Turn OnlineStore on by specifying True for the EnableOnlineStore flag.
The default value is False .
TtlDuration (dict) --
Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration . For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.
Unit (string) --
TtlDuration time unit.
Value (integer) --
TtlDuration time value.
StorageType (string) --
Option for different tiers of low latency storage for real-time data retrieval.
Standard : A managed low latency data store for feature groups.
InMemory : A managed data store for feature groups that supports very low latency retrieval.
OfflineStoreConfig (dict) --
The configuration of the offline store. It includes the following configurations:
Amazon S3 location of the offline store.
Configuration of the Glue data catalog.
Table format of the offline store.
Option to disable the automatic creation of a Glue table for the offline store.
Encryption configuration.
S3StorageConfig (dict) --
The Amazon Simple Storage (Amazon S3) location of OfflineStore .
S3Uri (string) --
The S3 URI, or location in Amazon S3, of OfflineStore .
S3 URIs have a format similar to the following: s3://example-bucket/prefix/ .
KmsKeyId (string) --
The Amazon Web Services Key Management Service (KMS) key ARN of the key used to encrypt any objects written into the OfflineStore S3 location.
The IAM roleARN that is passed as a parameter to CreateFeatureGroup must have below permissions to the KmsKeyId :
"kms:GenerateDataKey"
ResolvedOutputS3Uri (string) --
The S3 path where offline records are written.
DisableGlueTableCreation (boolean) --
Set to True to disable the automatic creation of an Amazon Web Services Glue table when configuring an OfflineStore . If set to False , Feature Store will name the OfflineStore Glue table following Athena's naming recommendations.
The default value is False .
DataCatalogConfig (dict) --
The meta data of the Glue table that is autogenerated when an OfflineStore is created.
TableName (string) --
The name of the Glue table.
Catalog (string) --
The name of the Glue table catalog.
Database (string) --
The name of the Glue table database.
TableFormat (string) --
Format for the offline store table. Supported formats are Glue (Default) and Apache Iceberg.
RoleArn (string) --
The Amazon Resource Name (ARN) of the IAM execution role used to persist data into the OfflineStore if an OfflineStoreConfig is provided.
FeatureGroupStatus (string) --
The status of the feature group.
OfflineStoreStatus (dict) --
The status of the OfflineStore . Notifies you if replicating data into the OfflineStore has failed. Returns either: Active or Blocked
Status (string) --
An OfflineStore status.
BlockedReason (string) --
The justification for why the OfflineStoreStatus is Blocked (if applicable).
LastUpdateStatus (dict) --
A value indicating whether the update made to the feature group was successful.
Status (string) --
A value that indicates whether the update was made successful.
FailureReason (string) --
If the update wasn't successful, indicates the reason why it failed.
FailureReason (string) --
The reason that the FeatureGroup failed to be replicated in the OfflineStore . This is failure can occur because:
The FeatureGroup could not be created in the OfflineStore .
The FeatureGroup could not be deleted from the OfflineStore .
Description (string) --
A free form description of the feature group.
NextToken (string) --
A token to resume pagination of the list of Features ( FeatureDefinitions ).
OnlineStoreTotalSizeBytes (integer) --
The size of the OnlineStore in bytes.
{'Results': {'FeatureGroup': {'FeatureDefinitions': {'CollectionConfig': {'VectorConfig': {'Dimension': 'integer'}}, 'CollectionType': 'List | ' 'Set | ' 'Vector'}, 'OnlineStoreConfig': {'StorageType': 'Standard | ' 'InMemory'}}}}
Finds SageMaker resources that match a search query. Matching resources are returned as a list of SearchRecord objects in the response. You can sort the search results by any resource property in a ascending or descending order.
You can query against the following value types: numeric, text, Boolean, and timestamp.
Note
The Search API may provide access to otherwise restricted data. See Amazon SageMaker API Permissions: Actions, Permissions, and Resources Reference for more information.
See also: AWS API Documentation
Request Syntax
client.search( 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', NextToken='string', MaxResults=123, CrossAccountFilterOption='SameAccount'|'CrossAccount' )
string
[REQUIRED]
The name of the SageMaker resource to search for.
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 Filters that can be included in a SearchExpression object 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 Value is also a decimal value. If the specified Value is 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 Name equals Value .
NotEquals
The value of Name doesn't equal Value .
Exists
The Name property exists.
NotExists
The Name property does not exist.
GreaterThan
The value of Name is greater than Value . Not supported for text properties.
GreaterThanOrEqualTo
The value of Name is greater than or equal to Value . Not supported for text properties.
LessThan
The value of Name is less than Value . Not supported for text properties.
LessThanOrEqualTo
The value of Name is less than or equal to Value . Not supported for text properties.
In
The value of Name is one of the comma delimited strings in Value . Only supported for text properties.
Contains
The value of Name contains the string Value . Only supported for text properties.
A SearchExpression can include the Contains operator multiple times when the value of Name is 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 SearchExpression can include only one Contains operator for all other values of Name . In these cases, if you include multiple Contains operators in the SearchExpression , the result is the following error message: " 'CONTAINS' operator usage limit of 1 exceeded. "
Value (string) --
A value used with Name and Operator to determine which resources satisfy the filter's condition. For numerical properties, Value must be an integer or floating-point decimal. For timestamp properties, Value must 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 InputDataConfig property with a specific channel name and S3Uri prefix, 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 Filters value. For example, a NestedFilters call might include a filter on the PropertyName parameter of the InputDataConfig property: 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 Value is also a decimal value. If the specified Value is 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 Name equals Value .
NotEquals
The value of Name doesn't equal Value .
Exists
The Name property exists.
NotExists
The Name property does not exist.
GreaterThan
The value of Name is greater than Value . Not supported for text properties.
GreaterThanOrEqualTo
The value of Name is greater than or equal to Value . Not supported for text properties.
LessThan
The value of Name is less than Value . Not supported for text properties.
LessThanOrEqualTo
The value of Name is less than or equal to Value . Not supported for text properties.
In
The value of Name is one of the comma delimited strings in Value . Only supported for text properties.
Contains
The value of Name contains the string Value . Only supported for text properties.
A SearchExpression can include the Contains operator multiple times when the value of Name is 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 SearchExpression can include only one Contains operator for all other values of Name . In these cases, if you include multiple Contains operators in the SearchExpression , the result is the following error message: " 'CONTAINS' operator usage limit of 1 exceeded. "
Value (string) --
A value used with Name and Operator to determine which resources satisfy the filter's condition. For numerical properties, Value must be an integer or floating-point decimal. For timestamp properties, Value must 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 SearchExpression can contain up to twenty elements.
A SearchExpression contains the following components:
A list of Filter objects. Each filter defines a simple Boolean expression comprised of a resource property name, Boolean operator, and value.
A list of NestedFilter objects. 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 SearchExpression objects. A search expression object can be nested in a list of search expression objects.
A Boolean operator: And or 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 .
string
The name of the resource property used to sort the SearchResults . The default is LastModifiedTime .
string
How SearchResults are ordered. Valid values are Ascending or Descending . The default is Descending .
string
If more than MaxResults resources match the specified SearchExpression , the response includes a NextToken . The NextToken can be passed to the next SearchRequest to continue retrieving results.
integer
The maximum number of results to return.
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 null the 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.
dict
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.
{'FeatureAdditions': {'CollectionConfig': {'VectorConfig': {'Dimension': 'integer'}}, 'CollectionType': 'List | Set | Vector'}}
Updates the feature group by either adding features or updating the online store configuration. Use one of the following request parameters at a time while using the UpdateFeatureGroup API.
You can add features for your feature group using the FeatureAdditions request parameter. Features cannot be removed from a feature group.
You can update the online store configuration by using the OnlineStoreConfig request parameter. If a TtlDuration is specified, the default TtlDuration applies for all records added to the feature group after the feature group is updated . If a record level TtlDuration exists from using the PutRecord API, the record level TtlDuration applies to that record instead of the default TtlDuration .
See also: AWS API Documentation
Request Syntax
client.update_feature_group( FeatureGroupName='string', FeatureAdditions=[ { 'FeatureName': 'string', 'FeatureType': 'Integral'|'Fractional'|'String', 'CollectionType': 'List'|'Set'|'Vector', 'CollectionConfig': { 'VectorConfig': { 'Dimension': 123 } } }, ], OnlineStoreConfig={ 'TtlDuration': { 'Unit': 'Seconds'|'Minutes'|'Hours'|'Days'|'Weeks', 'Value': 123 } } )
string
[REQUIRED]
The name or Amazon Resource Name (ARN) of the feature group that you're updating.
list
Updates the feature group. Updating a feature group is an asynchronous operation. When you get an HTTP 200 response, you've made a valid request. It takes some time after you've made a valid request for Feature Store to update the feature group.
(dict) --
A list of features. You must include FeatureName and FeatureType . Valid feature FeatureType s are Integral , Fractional and String .
FeatureName (string) --
The name of a feature. The type must be a string. FeatureName cannot be any of the following: is_deleted , write_time , api_invocation_time .
FeatureType (string) --
The value type of a feature. Valid values are Integral, Fractional, or String.
CollectionType (string) --
A grouping of elements where each element within the collection must have the same feature type ( String , Integral , or Fractional ).
List : An ordered collection of elements.
Set : An unordered collection of unique elements.
Vector : A specialized list that represents a fixed-size array of elements. The vector dimension is determined by you. Must have elements with fractional feature types.
CollectionConfig (dict) --
Configuration for your collection.
Note
This is a Tagged Union structure. Only one of the following top level keys can be set: VectorConfig.
VectorConfig (dict) --
Configuration for your vector collection type.
Dimension : The number of elements in your vector.
Dimension (integer) -- [REQUIRED]
The number of elements in your vector.
dict
Updates the feature group online store configuration.
TtlDuration (dict) --
Time to live duration, where the record is hard deleted after the expiration time is reached; ExpiresAt = EventTime + TtlDuration . For information on HardDelete, see the DeleteRecord API in the Amazon SageMaker API Reference guide.
Unit (string) --
TtlDuration time unit.
Value (integer) --
TtlDuration time value.
dict
Response Syntax
{ 'FeatureGroupArn': 'string' }
Response Structure
(dict) --
FeatureGroupArn (string) --
The Amazon Resource Number (ARN) of the feature group that you're updating.