Skip to content

Commit 16bd4bf

Browse files
authored
feat: add feature processor APIs to public doc (#4055)
* Adding feature processor APIs to public doc * Minor fix for the path of feature processor * Add spark dependencies to doc requirements * Fix the path * Remove iceberg data source to resolve build error * Remove feature_processor doc for now * Add feature_processor back * Rename the feature_processor file * Modify the feature processor path in test * Fix the path of feature processor * r * Fix the doc string error by removing the example block * r * r * Fix the black format validation * Add newline to requirement txt file * Fix the doc build failure * Add feature processor file * Fix the test * Remove requirements * mock pyspark import * Add more more import mocks * Add py4j for mock * Fix black validation failure
1 parent 5e83ad4 commit 16bd4bf

File tree

3 files changed

+48
-2
lines changed

3 files changed

+48
-2
lines changed

doc/api/prep_data/feature_store.rst

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,41 @@ Feature Store
120120
.. autoclass:: sagemaker.feature_store.feature_store.FeatureStore
121121
:members:
122122
:show-inheritance:
123+
124+
125+
@feature_processor Decorator
126+
****************************
127+
128+
.. autodecorator:: sagemaker.feature_store.feature_processor.feature_processor
129+
130+
131+
Feature Processor Data Source
132+
*****************************
133+
134+
.. autoclass:: sagemaker.feature_store.feature_processor.FeatureGroupDataSource
135+
:members:
136+
:show-inheritance:
137+
138+
.. autoclass:: sagemaker.feature_store.feature_processor.CSVDataSource
139+
:members:
140+
:show-inheritance:
141+
142+
.. autoclass:: sagemaker.feature_store.feature_processor.ParquetDataSource
143+
:members:
144+
:show-inheritance:
145+
146+
147+
Feature Processor Scheduler
148+
***************************
149+
150+
.. automethod:: sagemaker.feature_store.feature_processor.to_pipeline
151+
152+
.. automethod:: sagemaker.feature_store.feature_processor.schedule
153+
154+
.. automethod:: sagemaker.feature_store.feature_processor.execute
155+
156+
.. automethod:: sagemaker.feature_store.feature_processor.delete_schedule
157+
158+
.. automethod:: sagemaker.feature_store.feature_processor.describe
159+
160+
.. automethod:: sagemaker.feature_store.feature_processor.list_pipelines

doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@
109109
# autosectionlabel
110110
autosectionlabel_prefix_document = True
111111

112+
autodoc_mock_imports = ["pyspark", "feature_store_pyspark", "py4j"]
113+
112114

113115
def setup(app):
114116
sys.stdout.write("Generating JumpStart model table...")

src/sagemaker/feature_store/feature_processor/feature_processor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ def feature_processor(
4949
names nand types in [params: Dict[str, Any], spark: SparkSession]. Outputs: a single return
5050
value of type pyspark.sql.DataFrame. The function can have any name.
5151
52-
Example:
52+
**Example:**
53+
54+
.. code-block:: python
55+
5356
@feature_processor(
5457
inputs=[FeatureGroupDataSource("input-fg"), CSVDataSource("s3://bucket/prefix)],
5558
output='arn:aws:sagemaker:us-west-2:123456789012:feature-group/output-fg'
@@ -60,7 +63,10 @@ def transform(
6063
) -> DataFrame:
6164
return ...
6265
63-
More concisely:
66+
**More concisely:**
67+
68+
.. code-block:: python
69+
6470
@feature_processor(
6571
inputs=[FeatureGroupDataSource("input-fg"), CSVDataSource("s3://bucket/prefix)],
6672
output='arn:aws:sagemaker:us-west-2:123456789012:feature-group/output-fg'

0 commit comments

Comments
 (0)