sagemaker.mlops.feature_store.feature_definition#

Feature Definitions for FeatureStore.

Functions

FractionalFeatureDefinition(feature_name[, ...])

Create a feature definition with Fractional type.

IntegralFeatureDefinition(feature_name[, ...])

Create a feature definition with Integral type.

StringFeatureDefinition(feature_name[, ...])

Create a feature definition with String type.

Classes

CollectionTypeEnum(value)

Collection types: List, Set, or Vector.

FeatureTypeEnum(value)

Feature data types: Fractional, Integral, or String.

ListCollectionType()

List collection type.

SetCollectionType()

Set collection type.

VectorCollectionType(dimension)

Vector collection type with dimension.

class sagemaker.mlops.feature_store.feature_definition.CollectionTypeEnum(value)[source]#

Bases: Enum

Collection types: List, Set, or Vector.

LIST = 'List'#
SET = 'Set'#
VECTOR = 'Vector'#
class sagemaker.mlops.feature_store.feature_definition.FeatureDefinition(*, feature_name: str | PipelineVariable, feature_type: str | PipelineVariable, collection_type: str | PipelineVariable | None = Unassigned(), collection_config: CollectionConfig | None = Unassigned())[source]#

Bases: Base

A list of features. You must include FeatureName and FeatureType. Valid feature FeatureTypes are Integral, Fractional and String.

feature_name#
Type:

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. The name: Must start with an alphanumeric character. Can only include alphanumeric characters, underscores, and hyphens. Spaces are not allowed.

feature_type#
Type:

The value type of a feature. Valid values are Integral, Fractional, or String.

collection_type#
Type:

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.

collection_config#
Type:

Configuration for your collection.

collection_config: CollectionConfig | None#
collection_type: str | PipelineVariable | None#
feature_name: str | PipelineVariable#
feature_type: str | PipelineVariable#
model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

class sagemaker.mlops.feature_store.feature_definition.FeatureTypeEnum(value)[source]#

Bases: Enum

Feature data types: Fractional, Integral, or String.

FRACTIONAL = 'Fractional'#
INTEGRAL = 'Integral'#
STRING = 'String'#
sagemaker.mlops.feature_store.feature_definition.FractionalFeatureDefinition(feature_name: str, collection_type: ListCollectionType | SetCollectionType | VectorCollectionType | None = None) FeatureDefinition[source]#

Create a feature definition with Fractional type.

sagemaker.mlops.feature_store.feature_definition.IntegralFeatureDefinition(feature_name: str, collection_type: ListCollectionType | SetCollectionType | VectorCollectionType | None = None) FeatureDefinition[source]#

Create a feature definition with Integral type.

class sagemaker.mlops.feature_store.feature_definition.ListCollectionType[source]#

Bases: object

List collection type.

collection_config = None#
collection_type = 'List'#
class sagemaker.mlops.feature_store.feature_definition.SetCollectionType[source]#

Bases: object

Set collection type.

collection_config = None#
collection_type = 'Set'#
sagemaker.mlops.feature_store.feature_definition.StringFeatureDefinition(feature_name: str, collection_type: ListCollectionType | SetCollectionType | VectorCollectionType | None = None) FeatureDefinition[source]#

Create a feature definition with String type.

class sagemaker.mlops.feature_store.feature_definition.VectorCollectionType(dimension: int)[source]#

Bases: object

Vector collection type with dimension.

collection_type = 'Vector'#