Skip to content

feat: add feature processor APIs to public doc #4055

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
cd78a91
Adding feature processor APIs to public doc
can-sun Aug 7, 2023
5d0c04d
Minor fix for the path of feature processor
can-sun Aug 7, 2023
924d2f1
Merge branch 'master' into master
can-sun Aug 21, 2023
6330a9a
Add spark dependencies to doc requirements
can-sun Aug 21, 2023
e4d83fc
Fix the path
can-sun Aug 21, 2023
497c0a0
Remove iceberg data source to resolve build error
can-sun Aug 21, 2023
ed622a9
Remove feature_processor doc for now
can-sun Aug 21, 2023
8f687ff
Add feature_processor back
can-sun Aug 21, 2023
e87d1d1
Rename the feature_processor file
can-sun Aug 21, 2023
50f0d3e
Modify the feature processor path in test
can-sun Aug 21, 2023
f1c9161
Fix the path of feature processor
can-sun Aug 21, 2023
23c0892
r
can-sun Aug 21, 2023
14d3de9
Fix the doc string error by removing the example block
can-sun Aug 21, 2023
3d3df8b
r
can-sun Aug 21, 2023
2a13f2b
r
can-sun Aug 21, 2023
cb330c2
Fix the black format validation
can-sun Aug 21, 2023
3333e1f
Add newline to requirement txt file
can-sun Aug 21, 2023
dd3631a
Fix the doc build failure
can-sun Sep 22, 2023
da8fa99
Add feature processor file
can-sun Sep 22, 2023
616af32
Fix the test
can-sun Sep 22, 2023
3b52e80
Remove requirements
can-sun Sep 23, 2023
94dace2
mock pyspark import
can-sun Sep 23, 2023
149ca70
Add more more import mocks
can-sun Sep 23, 2023
43cdbf9
Add py4j for mock
can-sun Sep 23, 2023
2a05313
Merge branch 'master' into master
can-sun Sep 23, 2023
5c34b9d
Merge branch 'master' into master
can-sun Sep 27, 2023
55ddded
Merge branch 'master' into master
can-sun Sep 28, 2023
1378911
Fix black validation failure
can-sun Oct 2, 2023
1a8d9e8
Merge branch 'master' into master
can-sun Oct 2, 2023
9152dc3
Merge branch 'master' into master
can-sun Oct 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions doc/api/prep_data/feature_store.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,41 @@ Feature Store
.. autoclass:: sagemaker.feature_store.feature_store.FeatureStore
:members:
:show-inheritance:


@feature_processor Decorator
****************************

.. autodecorator:: sagemaker.feature_store.feature_processor.feature_processor


Feature Processor Data Source
*****************************

.. autoclass:: sagemaker.feature_store.feature_processor.FeatureGroupDataSource
:members:
:show-inheritance:

.. autoclass:: sagemaker.feature_store.feature_processor.CSVDataSource
:members:
:show-inheritance:

.. autoclass:: sagemaker.feature_store.feature_processor.ParquetDataSource
:members:
:show-inheritance:


Feature Processor Scheduler
***************************

.. automethod:: sagemaker.feature_store.feature_processor.to_pipeline

.. automethod:: sagemaker.feature_store.feature_processor.schedule

.. automethod:: sagemaker.feature_store.feature_processor.execute

.. automethod:: sagemaker.feature_store.feature_processor.delete_schedule

.. automethod:: sagemaker.feature_store.feature_processor.describe

.. automethod:: sagemaker.feature_store.feature_processor.list_pipelines
2 changes: 2 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@
# autosectionlabel
autosectionlabel_prefix_document = True

autodoc_mock_imports = ["pyspark", "feature_store_pyspark", "py4j"]


def setup(app):
sys.stdout.write("Generating JumpStart model table...")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ def feature_processor(
names nand types in [params: Dict[str, Any], spark: SparkSession]. Outputs: a single return
value of type pyspark.sql.DataFrame. The function can have any name.

Example:
**Example:**

.. code-block:: python

@feature_processor(
inputs=[FeatureGroupDataSource("input-fg"), CSVDataSource("s3://bucket/prefix)],
output='arn:aws:sagemaker:us-west-2:123456789012:feature-group/output-fg'
Expand All @@ -60,7 +63,10 @@ def transform(
) -> DataFrame:
return ...

More concisely:
**More concisely:**

.. code-block:: python

@feature_processor(
inputs=[FeatureGroupDataSource("input-fg"), CSVDataSource("s3://bucket/prefix)],
output='arn:aws:sagemaker:us-west-2:123456789012:feature-group/output-fg'
Expand Down