File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
src/sagemaker/feature_store
tests/unit/sagemaker/feature_store Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -179,10 +179,10 @@ def _ingest_single_batch(
179
179
end_index (int): ending position to ingest in this batch.
180
180
"""
181
181
logger .info ("Started ingesting index %d to %d" , start_index , end_index )
182
- for row in data_frame [start_index :end_index ].itertuples ( index = False ):
182
+ for _ , row in data_frame [start_index :end_index ].iterrows ( ):
183
183
record = [
184
184
FeatureValue (feature_name = name , value_as_string = str (value ))
185
- for name , value in row ._asdict (). items ()
185
+ for name , value in row .items ()
186
186
]
187
187
sagemaker_session .put_record (
188
188
feature_group_name = feature_group_name , record = [value .to_dict () for value in record ]
Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ def test_load_feature_definition_unsupported_types(sagemaker_session_mock):
146
146
@patch ("sagemaker.feature_store.feature_group.IngestionManagerPandas" )
147
147
def test_ingest (ingestion_manager_init , sagemaker_session_mock ):
148
148
feature_group = FeatureGroup (name = "MyGroup" , sagemaker_session = sagemaker_session_mock )
149
- df = pd .DataFrame ({ "float" : pd .Series ([2.0 ], dtype = "float64" )} )
149
+ df = pd .DataFrame (dict (( f "float{ i } " , pd .Series ([2.0 ], dtype = "float64" )) for i in range ( 300 )) )
150
150
151
151
mock_ingestion_manager_instance = Mock ()
152
152
ingestion_manager_init .return_value = mock_ingestion_manager_instance
You can’t perform that action at this time.
0 commit comments