Amazon SageMaker Service

2022/06/29 - Amazon SageMaker Service - 3 new 3 updated api methods

Changes  This release adds: UpdateFeatureGroup, UpdateFeatureMetadata, DescribeFeatureMetadata APIs; FeatureMetadata type in Search API; LastModifiedTime, LastUpdateStatus, OnlineStoreTotalSizeBytes in DescribeFeatureGroup API.

UpdateFeatureMetadata (new) Link ¶

Updates the description and parameters of the feature group.

See also: AWS API Documentation

Request Syntax

client.update_feature_metadata(
    FeatureGroupName='string',
    FeatureName='string',
    Description='string',
    ParameterAdditions=[
        {
            'Key': 'string',
            'Value': 'string'
        },
    ],
    ParameterRemovals=[
        'string',
    ]
)
type FeatureGroupName

string

param FeatureGroupName

[REQUIRED]

The name of the feature group containing the feature that you're updating.

type FeatureName

string

param FeatureName

[REQUIRED]

The name of the feature that you're updating.

type Description

string

param Description

A description that you can write to better describe the feature.

type ParameterAdditions

list

param ParameterAdditions

A list of key-value pairs that you can add to better describe the feature.

  • (dict) --

    A key-value pair that you specify to describe the feature.

    • Key (string) --

      A key that must contain a value to describe the feature.

    • Value (string) --

      The value that belongs to a key.

type ParameterRemovals

list

param ParameterRemovals

A list of parameter keys that you can specify to remove parameters that describe your feature.

  • (string) --

returns

None

UpdateFeatureGroup (new) Link ¶

Updates the feature group.

See also: AWS API Documentation

Request Syntax

client.update_feature_group(
    FeatureGroupName='string',
    FeatureAdditions=[
        {
            'FeatureName': 'string',
            'FeatureType': 'Integral'|'Fractional'|'String'
        },
    ]
)
type FeatureGroupName

string

param FeatureGroupName

[REQUIRED]

The name of the feature group that you're updating.

type FeatureAdditions

list

param FeatureAdditions

A list of the features that you're adding to 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.

rtype

dict

returns

Response Syntax

{
    'FeatureGroupArn': 'string'
}

Response Structure

  • (dict) --

    • FeatureGroupArn (string) --

      The Amazon Resource Number (ARN) of the feature group that you're updating.

DescribeFeatureMetadata (new) Link ¶

Shows the metadata for a feature within a feature group.

See also: AWS API Documentation

Request Syntax

client.describe_feature_metadata(
    FeatureGroupName='string',
    FeatureName='string'
)
type FeatureGroupName

string

param FeatureGroupName

[REQUIRED]

The name of the feature group containing the feature.

type FeatureName

string

param FeatureName

[REQUIRED]

The name of the feature.

rtype

dict

returns

Response Syntax

{
    'FeatureGroupArn': 'string',
    'FeatureGroupName': 'string',
    'FeatureName': 'string',
    'FeatureType': 'Integral'|'Fractional'|'String',
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'Description': 'string',
    'Parameters': [
        {
            'Key': 'string',
            'Value': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • FeatureGroupArn (string) --

      The Amazon Resource Number (ARN) of the feature group that contains the feature.

    • FeatureGroupName (string) --

      The name of the feature group that you've specified.

    • FeatureName (string) --

      The name of the feature that you've specified.

    • FeatureType (string) --

      The data type of the feature.

    • CreationTime (datetime) --

      A timestamp indicating when the feature was created.

    • LastModifiedTime (datetime) --

      A timestamp indicating when the metadata for the feature group was modified. For example, if you add a parameter describing the feature, the timestamp changes to reflect the last time you

    • Description (string) --

      The description you added to describe the feature.

    • Parameters (list) --

      The key-value pairs that you added to describe the feature.

      • (dict) --

        A key-value pair that you specify to describe the feature.

        • Key (string) --

          A key that must contain a value to describe the feature.

        • Value (string) --

          The value that belongs to a key.

DescribeFeatureGroup (updated) Link ¶
Changes (response)
{'LastModifiedTime': 'timestamp',
 'LastUpdateStatus': {'FailureReason': 'string',
                      'Status': 'Successful | Failed | InProgress'},
 'OnlineStoreTotalSizeBytes': 'long'}

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'
)
type FeatureGroupName

string

param FeatureGroupName

[REQUIRED]

The name of the FeatureGroup you want described.

type NextToken

string

param NextToken

A token to resume pagination of the list of Features (FeatureDefinitions ). 2,500 Features are returned by default.

rtype

dict

returns

Response Syntax

{
    'FeatureGroupArn': 'string',
    'FeatureGroupName': 'string',
    'RecordIdentifierFeatureName': 'string',
    'EventTimeFeatureName': 'string',
    'FeatureDefinitions': [
        {
            'FeatureName': 'string',
            'FeatureType': 'Integral'|'Fractional'|'String'
        },
    ],
    'CreationTime': datetime(2015, 1, 1),
    'LastModifiedTime': datetime(2015, 1, 1),
    'OnlineStoreConfig': {
        'SecurityConfig': {
            'KmsKeyId': 'string'
        },
        'EnableOnlineStore': True|False
    },
    'OfflineStoreConfig': {
        'S3StorageConfig': {
            'S3Uri': 'string',
            'KmsKeyId': 'string',
            'ResolvedOutputS3Uri': 'string'
        },
        'DisableGlueTableCreation': True|False,
        'DataCatalogConfig': {
            'TableName': 'string',
            'Catalog': 'string',
            'Database': 'string'
        }
    },
    '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.

    • 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 ID of the Amazon Web Services Key Management Service (Amazon Web Services KMS) key that SageMaker Feature Store uses to encrypt the Amazon S3 objects at rest using Amazon S3 server-side encryption.

          The caller (either IAM 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 IAM 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 .

    • OfflineStoreConfig (dict) --

      The configuration of the OfflineStore , inducing the S3 location of the OfflineStore , Amazon Web Services Glue or Amazon Web Services Hive data catalogue configurations, and the security 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 ID 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 .

      • 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.

    • 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.

GetSearchSuggestions (updated) Link ¶
Changes (request)
{'Resource': {'FeatureMetadata'}}

An auto-complete API for the search functionality in the Amazon SageMaker console. It returns suggestions of possible matches for the property name to use in Search queries. Provides suggestions for HyperParameters , Tags , and Metrics .

See also: AWS API Documentation

Request Syntax

client.get_search_suggestions(
    Resource='TrainingJob'|'Experiment'|'ExperimentTrial'|'ExperimentTrialComponent'|'Endpoint'|'ModelPackage'|'ModelPackageGroup'|'Pipeline'|'PipelineExecution'|'FeatureGroup'|'Project'|'FeatureMetadata',
    SuggestionQuery={
        'PropertyNameQuery': {
            'PropertyNameHint': 'string'
        }
    }
)
type Resource

string

param Resource

[REQUIRED]

The name of the Amazon SageMaker resource to search for.

type SuggestionQuery

dict

param SuggestionQuery

Limits the property names that are included in the response.

  • PropertyNameQuery (dict) --

    Defines a property name hint. Only property names that begin with the specified hint are included in the response.

    • PropertyNameHint (string) -- [REQUIRED]

      Text that begins a property's name.

rtype

dict

returns

Response Syntax

{
    'PropertyNameSuggestions': [
        {
            'PropertyName': 'string'
        },
    ]
}

Response Structure

  • (dict) --

    • PropertyNameSuggestions (list) --

      A list of property names for a Resource that match a SuggestionQuery .

      • (dict) --

        A property name returned from a GetSearchSuggestions call that specifies a value in the PropertyNameQuery field.

        • PropertyName (string) --

          A suggested property name based on what you entered in the search textbox in the Amazon SageMaker console.