Skip to content

Commit e4f7058

Browse files
BassemHalimbhhalim
andauthored
docs(ml_ops): Add Feature Store reference to Implement MLOps page (#5845)
* docs(ml_ops): Add Feature Store reference to Implement MLOps page Add FeatureStore documentation including: - Feature Store bullet in Key MLOps Features section - FeatureGroupManager example with LakeFormationConfig and IcebergProperties - Base FeatureGroup resource usage example - V2-to-V3 migration table entry for FeatureGroup - Feature Store entry in V3 Package Structure table * moving fs notebook to subdir --------- Co-authored-by: Basssem Halim <bhhalim@amazon.com>
1 parent bf290ff commit e4f7058

7 files changed

Lines changed: 73 additions & 1 deletion

File tree

docs/ml_ops/index.rst

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ Key MLOps Features
162162
* **Model Performance Tracking** - Real-time monitoring of model accuracy, latency, and business metrics with alerting
163163
* **Bias Detection and Fairness** - Built-in bias detection across protected attributes with automated reporting and remediation
164164
* **Automated Retraining** - Trigger-based model retraining based on performance degradation or data drift detection
165+
* **Feature Store** - Centralized repository for storing, sharing, and managing ML features with support for both online and offline stores
165166

166167
Supported MLOps Scenarios
167168
-------------------------
@@ -477,6 +478,75 @@ Train with MLflow metric tracking and deploy from the MLflow model registry.
477478

478479

479480

481+
Feature Store
482+
--------------
483+
484+
485+
Create and manage feature groups for storing, retrieving, and sharing ML features across teams and models.
486+
487+
**FeatureGroupManager with Lake Formation and Iceberg configuration:**
488+
489+
.. code-block:: python
490+
491+
from sagemaker.mlops.feature_store import FeatureGroupManager, FeatureDefinition, FeatureTypeEnum
492+
from sagemaker.mlops.feature_store.feature_group_manager import LakeFormationConfig, IcebergProperties
493+
from sagemaker.core.shapes import OnlineStoreConfig, OfflineStoreConfig, S3StorageConfig
494+
495+
# Define features
496+
feature_definitions = [
497+
FeatureDefinition(feature_name="customer_id", feature_type=FeatureTypeEnum.STRING),
498+
FeatureDefinition(feature_name="purchase_count", feature_type=FeatureTypeEnum.INTEGRAL),
499+
FeatureDefinition(feature_name="avg_order_value", feature_type=FeatureTypeEnum.FRACTIONAL),
500+
FeatureDefinition(feature_name="event_time", feature_type=FeatureTypeEnum.STRING),
501+
]
502+
503+
# Configure Lake Formation for fine-grained access control
504+
lake_formation_config = LakeFormationConfig(
505+
enabled=True,
506+
hybrid_access_mode_enabled=True,
507+
acknowledge_risk=True,
508+
)
509+
510+
# Configure Iceberg table properties
511+
iceberg_properties = IcebergProperties(
512+
properties={
513+
"write.target-file-size-bytes": "536870912",
514+
"history.expire.min-snapshots-to-keep": "3",
515+
}
516+
)
517+
518+
# Create feature group with Lake Formation and Iceberg configs
519+
feature_group = FeatureGroupManager.create(
520+
feature_group_name="customer-features",
521+
record_identifier_feature_name="customer_id",
522+
event_time_feature_name="event_time",
523+
feature_definitions=feature_definitions,
524+
online_store_config=OnlineStoreConfig(enable_online_store=True),
525+
offline_store_config=OfflineStoreConfig(
526+
s3_storage_config=S3StorageConfig(s3_uri="s3://bucket/feature-store/"),
527+
table_format="Iceberg",
528+
),
529+
role_arn=role,
530+
lake_formation_config=lake_formation_config,
531+
iceberg_properties=iceberg_properties,
532+
)
533+
534+
**Using the base FeatureGroup resource:**
535+
536+
.. code-block:: python
537+
538+
from sagemaker.core.resources import FeatureGroup
539+
540+
# Retrieve an existing feature group
541+
feature_group = FeatureGroup.get(feature_group_name="customer-features")
542+
543+
# List feature groups
544+
feature_groups = FeatureGroup.get_all()
545+
for fg in feature_groups:
546+
print(f"{fg.feature_group_name}: {fg.feature_group_status}")
547+
548+
549+
480550
Migration from V2
481551
------------------
482552

@@ -524,6 +594,8 @@ MLOps Classes and Imports
524594
- ``sagemaker.core.workflow.pipeline_context.PipelineSession``
525595
* - ``sagemaker.lineage.context.Context``
526596
- ``sagemaker.core.lineage.context.Context``
597+
* - ``sagemaker.feature_store.feature_group.FeatureGroup``
598+
- ``sagemaker.mlops.feature_store.FeatureGroupManager``
527599

528600

529601
V3 Package Structure
@@ -543,7 +615,7 @@ V3 Package Structure
543615
* - ``sagemaker-serve``
544616
- ModelBuilder (build, register, deploy)
545617
* - ``sagemaker-mlops``
546-
- Pipeline, ProcessingStep, TrainingStep, ModelStep, TuningStep, EMRServerlessStep, CacheConfig
618+
- Pipeline, ProcessingStep, TrainingStep, ModelStep, TuningStep, EMRServerlessStep, CacheConfig, Feature Store (FeatureGroupManager, FeatureDefinition, DatasetBuilder)
547619

548620

549621
Explore comprehensive MLOps examples:

v3-examples/ml-ops-examples/v3-feature-store-iceberg-properties-example.ipynb renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/iceberg-metadata-management/v3-feature-store-iceberg-properties-example.ipynb

File renamed without changes.

v3-examples/ml-ops-examples/v3-feature-store-examples/imgs/cross-account-feature-group-lakeformation-1.png renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/lake-formation/imgs/cross-account-feature-group-lakeformation-1.png

File renamed without changes.

v3-examples/ml-ops-examples/v3-feature-store-examples/imgs/fs-lf-cross-account1.png renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/lake-formation/imgs/fs-lf-cross-account1.png

File renamed without changes.

v3-examples/ml-ops-examples/v3-feature-store-examples/imgs/lakeformation-flow.png renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/lake-formation/imgs/lakeformation-flow.png

File renamed without changes.

v3-examples/ml-ops-examples/v3-feature-store-examples/v3-feature-store-lake-formation-cross-account.ipynb renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/lake-formation/v3-feature-store-lake-formation-cross-account.ipynb

File renamed without changes.

v3-examples/ml-ops-examples/v3-feature-store-examples/v3-feature-store-lake-formation.ipynb renamed to v3-examples/ml-ops-examples/v3-feature-store-examples/lake-formation/v3-feature-store-lake-formation.ipynb

File renamed without changes.

0 commit comments

Comments
 (0)