Skip to content

Commit fafc4db

Browse files
authored
Merge branch 'master' into tf-distribution
2 parents 0c64068 + dc29b02 commit fafc4db

File tree

5 files changed

+8
-11
lines changed

5 files changed

+8
-11
lines changed

doc/frameworks/pytorch/using_pytorch.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Using third-party libraries
132132
---------------------------
133133

134134
When running your training script on SageMaker, it will have access to some pre-installed third-party libraries including ``torch``, ``torchvision``, and ``numpy``.
135-
For more information on the runtime environment, including specific package versions, see `SageMaker PyTorch Docker containers <https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/pytorch#sagemaker-pytorch-docker-containers>`_.
135+
For more information on the runtime environment, including specific package versions, see `SageMaker PyTorch Docker containers <https://github.com/aws/deep-learning-containers/tree/master/pytorch>`_.
136136

137137
If there are other packages you want to use with your script, you can include a ``requirements.txt`` file in the same directory as your training script to install other dependencies at runtime. Both ``requirements.txt`` and your training script should be put in the same folder. You must specify this folder in ``source_dir`` argument when creating PyTorch estimator.
138138

src/sagemaker/lineage/artifact.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ class Artifact(_base_types.Record):
8181
def save(self):
8282
"""Save the state of this Artifact to SageMaker.
8383
84+
Note that this method must be run from a SageMaker context such as Studio or a training job
85+
due to restrictions on the CreateArtifact API.
86+
8487
Returns:
8588
Artifact: A SageMaker `Artifact` object.
8689
"""

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(

0 commit comments

Comments
 (0)