Skip to content

Commit 5f3048e

Browse files
authored
Merge branch 'master' into fix-updater
2 parents 481f754 + 6720a19 commit 5f3048e

File tree

6 files changed

+8
-13
lines changed

6 files changed

+8
-13
lines changed

src/sagemaker/feature_store/feature_group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,10 +179,10 @@ def _ingest_single_batch(
179179
end_index (int): ending position to ingest in this batch.
180180
"""
181181
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():
183183
record = [
184184
FeatureValue(feature_name=name, value_as_string=str(value))
185-
for name, value in row._asdict().items()
185+
for name, value in row.items()
186186
]
187187
sagemaker_session.put_record(
188188
feature_group_name=feature_group_name, record=[value.to_dict() for value in record]

src/sagemaker/tensorflow/estimator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ def __init__(
113113
:class:`~sagemaker.estimator.Framework` and
114114
:class:`~sagemaker.estimator.EstimatorBase`.
115115
"""
116+
distribution = renamed_kwargs("distributions", "distribution", distribution, kwargs)
116117
instance_type = renamed_kwargs(
117118
"train_instance_type", "instance_type", kwargs.get("instance_type"), kwargs
118119
)

tests/data/tensorflow_mnist/mnist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def serving_input_fn():
159159

160160
# Train the model
161161
train_input_fn = tf.compat.v1.estimator.inputs.numpy_input_fn(
162-
x={"x": train_data}, y=train_labels, batch_size=50, num_epochs=None, shuffle=True
162+
x={"x": train_data}, y=train_labels, batch_size=50, num_epochs=None, shuffle=False
163163
)
164164

165165
# Evaluate the model and print results

tests/integ/test_spark_processing.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,13 @@ def test_integ_history_server(spark_py_processor, sagemaker_session):
302302
sagemaker_session=sagemaker_session,
303303
)
304304

305+
# sleep 3 seconds to avoid s3 eventual consistency issue
306+
time.sleep(3)
305307
spark_py_processor.start_history_server(spark_event_logs_s3_uri=spark_event_logs_s3_uri)
306308

307309
try:
308310
response = _request_with_retry(HISTORY_SERVER_ENDPOINT)
309311
assert response.status == 200
310-
311-
# spark has redirect behavior, this request verify that page navigation works with redirect
312-
response = _request_with_retry(f"{HISTORY_SERVER_ENDPOINT}{SPARK_APPLICATION_URL_SUFFIX}")
313-
assert response.status == 200
314-
315-
html_content = response.data.decode("utf-8")
316-
assert "Completed Jobs (4)" in html_content
317-
assert "collect at /opt/ml/processing/input/code/test_long_duration.py:32" in html_content
318312
finally:
319313
spark_py_processor.terminate_history_server()
320314

tests/integ/test_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def test_transform_tf_kms_network_isolation(
420420
with open(os.path.join(tmpdir, "tf-batch-output", "data.csv.out")) as f:
421421
result = json.load(f)
422422
assert len(result["predictions"][0]["probabilities"]) == 10
423-
assert result["predictions"][0]["classes"] == 1
423+
assert result["predictions"][0]["classes"] >= 1
424424

425425

426426
def _create_transformer_and_transform_job(

tests/unit/sagemaker/feature_store/test_feature_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def test_load_feature_definition_unsupported_types(sagemaker_session_mock):
146146
@patch("sagemaker.feature_store.feature_group.IngestionManagerPandas")
147147
def test_ingest(ingestion_manager_init, sagemaker_session_mock):
148148
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)))
150150

151151
mock_ingestion_manager_instance = Mock()
152152
ingestion_manager_init.return_value = mock_ingestion_manager_instance

0 commit comments

Comments
 (0)