ladderlore
  • Type a service name, like S3 or IAM.

Service · Machine Learning · Builds on AIF-C01

Amazon SageMaker Feature Store

Feature groups, online and offline stores, point-in-time joins and sharing for consistent ML features.

You know from AI Practitioner

  • Feature Store keeps features in one place for training and serving.
  • The online store gives fast lookups and the offline store keeps history in S3.
  • Ingestion adds records to a feature group.
Read the AI Practitioner lesson
  • Keeps

    Online store
    Latest record per ID
    Offline store
    Every record
  • Read speed

    Online store
    Milliseconds
    Offline store
    Query time
  • Used for

    Online store
    Real-time inference
    Offline store
    Training, batch
  • Lives in

    Online store
    Managed store
    Offline store
    S3 and Glue catalog
Online and offline stores side by side.
Labeled examples
Offline store
Point-in-time join
Training data
  1. 1Labeled examples carry an event time.
  2. 2The offline store holds feature history.
  3. 3The join picks the values as of each event time, and builds the training set.
Each example gets the feature values that were true at its time.

Step by step

  1. 1Labeled examples carry an event time.
  2. 2The offline store holds feature history.
  3. 3The join picks the values as of each event time, and builds the training set.

Each example gets the feature values that were true at its time.

What it is

A feature group is a table of features. Each feature has a name and a type: string, integral or fractional. The group needs a record identifier, which names the entity, and an event time, which says when the values were true. A group can hold up to 2,500 feature definitions, and a record up to 350 KB. The online store keeps the latest record per identifier and serves it through GetRecord in milliseconds, for real-time inference. The offline store keeps every record in S3 for training and batch work, and Athena can query it.

What it is

A point-in-time correct query joins each training example to the feature values that were true at that example’s event time, not the latest values. Without it, a model trains on information from the future, which is leakage. The Feature Store SDK builds such datasets from feature groups, and Athena queries on the offline store can do the same.

Training and serving read the same feature definitions, so the value computed for training matches the value served online. That removes training and serving skew. A feature group can be shared with other accounts, so a team can reuse features without copying them.

Remember

  • Feature group: features, a record identifier and an event time.
  • Online store: latest record, millisecond reads. Offline store: all records in S3.
  • Point-in-time join: features as they were at each example’s event time.
  • Same definitions for training and serving means no skew.
  • Share feature groups across accounts instead of copying them.

Remember

  • Up to 2,500 features per group and 350 KB per record.

On the exam

  • “Avoid using future feature values when building training data” points to a point-in-time correct join.
  • “Serve the latest customer features in milliseconds” points to the online store.
  • “Reuse a team’s features in another account” points to sharing the feature group across accounts.