Skip to content

Commit 8d138ff

Browse files
mwfongAWSJoseJuan98
authored andcommitted
fix: Update feature_group.py ingest() description (aws#3615)
* Update feature_group.py ingest() description Updating ingest function description (https://sagemaker.readthedocs.io/en/stable/api/prep_data/feature_store.html#sagemaker.feature_store.feature_group.FeatureGroup.ingest) according to discussion in a thread (https://amzn-aws.slack.com/archives/C02FT61K4BV/p1661876115110819). * documentation: get rid of white spaces
1 parent 9752a89 commit 8d138ff

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

src/sagemaker/feature_store/feature_group.py

+16-11
Original file line numberDiff line numberDiff line change
@@ -708,20 +708,25 @@ def ingest(
708708
) -> IngestionManagerPandas:
709709
"""Ingest the content of a pandas DataFrame to feature store.
710710
711-
``max_worker`` number of thread will be created to work on different partitions of
712-
the ``data_frame`` in parallel.
711+
``max_worker`` the number of threads created to work on different partitions of the
712+
``data_frame`` in parallel.
713713
714-
``max_processes`` number of processes will be created to work on different partitions
715-
of the ``data_frame`` in parallel, each with ``max_worker`` threads.
714+
``max_processes`` the number of processes will be created to work on different
715+
partitions of the ``data_frame`` in parallel, each with ``max_worker`` threads.
716716
717-
The ingest function will attempt to ingest all records in the data frame. If ``wait``
718-
is True, then an exception is thrown after all records have been processed. If ``wait``
719-
is False, then a later call to the returned instance IngestionManagerPandas' ``wait()``
720-
function will throw an exception.
717+
The ingest function attempts to ingest all records in the data frame. SageMaker
718+
Feature Store throws an exception if it fails to ingest any records.
721719
722-
Zero based indices of rows that failed to be ingested can be found in the exception.
723-
They can also be found from the IngestionManagerPandas' ``failed_rows`` function after
724-
the exception is thrown.
720+
If ``wait`` is ``True``, Feature Store runs the ``ingest`` function synchronously.
721+
You receive an ``IngestionError`` if there are any records that can't be ingested.
722+
If ``wait`` is ``False``, Feature Store runs the ``ingest`` function asynchronously.
723+
724+
Instead of setting ``wait`` to ``True`` in the ``ingest`` function, you can invoke
725+
the ``wait`` function on the returned instance of ``IngestionManagerPandas`` to run
726+
the ``ingest`` function synchronously.
727+
728+
To access the rows that failed to ingest, set ``wait`` to ``False``. The
729+
``IngestionError.failed_rows`` object saves all of the rows that failed to ingest.
725730
726731
`profile_name` argument is an optional one. It will use the default credential if None is
727732
passed. This `profile_name` is used in the sagemaker_featurestore_runtime client only. See

0 commit comments

Comments
 (0)