Skip to content

Commit 80ef94b

Browse files
author
Chuyang Deng
committed
add more docs and update error message
1 parent e82886b commit 80ef94b

File tree

4 files changed

+52
-44
lines changed

4 files changed

+52
-44
lines changed

src/sagemaker/fw_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def create_image_uri(
259259
raise ValueError("invalid py_version argument: {}".format(py_version))
260260

261261
if py_version == "py37" and framework not in PY37_SUPPORTED_FRAMEWORKS:
262-
raise ValueError("{} does not support Python 3.7 yet.".format(framework))
262+
raise ValueError("{} does not support Python 3.7 at this time.".format(framework))
263263

264264
if _accelerator_type_valid_for_framework(
265265
framework=framework,

src/sagemaker/tensorflow/README.rst

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -31,43 +31,43 @@ SageMaker TensorFlow Docker containers
3131

3232
The latest containers include the following Python packages:
3333

34-
+--------------------------------+---------------+---------------+
35-
| Dependencies | TF 1.15.2 | TF 2.1 |
36-
+--------------------------------+---------------+---------------+
37-
| awscli | 1.18.1 | 1.18.3 |
38-
+--------------------------------+---------------+---------------+
39-
| boto3 | 1.12.1 | 1.12.3 |
40-
+--------------------------------+---------------+---------------+
41-
| botocore | 1.15.1 | 1.15.3 |
42-
+--------------------------------+---------------+---------------+
43-
| h5py | 2.10.0 | 2.10.0 |
44-
+--------------------------------+---------------+---------------+
45-
| horovod | 0.18.2 | 0.18.2 |
46-
+--------------------------------+---------------+---------------+
47-
| keras | 2.3.1 | 2.3.1 |
48-
+--------------------------------+---------------+---------------+
49-
| mpi4py | 3.0.2 | 3.0.3 |
50-
+--------------------------------+---------------+---------------+
51-
| numpy | 1.18.1 | 1.18.1 |
52-
+--------------------------------+---------------+---------------+
53-
| pandas | 0.24.2 | 1.0.1 |
54-
+--------------------------------+---------------+---------------+
55-
| pip | 20.0.2 | 20.0.2 |
56-
+--------------------------------+---------------+---------------+
57-
| Pillow | 6.2.1 | 7.0.0 |
58-
+--------------------------------+---------------+---------------+
59-
| Python | 2.7 or 3.6 | 2.7 or 3.6 |
60-
+--------------------------------+---------------+---------------+
61-
| requests | 2.22.0 | 2.22.0 |
62-
+--------------------------------+---------------+---------------+
63-
| sagemaker-containers | 2.7.0 | 2.8.0 |
64-
+--------------------------------+---------------+---------------+
65-
| sagemaker-tensorflow-container | 1.15.0.1.1.0 | 2.0.0.1.1.0 |
66-
+--------------------------------+---------------+---------------+
67-
| scipy | 1.2.2 | 1.4.1 |
68-
+--------------------------------+---------------+---------------+
69-
| tensorflow | 1.15.2 | 2.1.0 |
70-
+--------------------------------+---------------+---------------+
34+
+--------------------------------+--------------------+---------------+
35+
| Dependencies | TF 1.15.2 | TF 2.1 |
36+
+--------------------------------+--------------------+---------------+
37+
| awscli | 1.18.1 | 1.18.3 |
38+
+--------------------------------+--------------------+---------------+
39+
| boto3 | 1.12.1 | 1.12.3 |
40+
+--------------------------------+--------------------+---------------+
41+
| botocore | 1.15.1 | 1.15.3 |
42+
+--------------------------------+--------------------+---------------+
43+
| h5py | 2.10.0 | 2.10.0 |
44+
+--------------------------------+--------------------+---------------+
45+
| horovod | 0.18.2 | 0.18.2 |
46+
+--------------------------------+--------------------+---------------+
47+
| keras | 2.3.1 | 2.3.1 |
48+
+--------------------------------+--------------------+---------------+
49+
| mpi4py | 3.0.2 | 3.0.3 |
50+
+--------------------------------+--------------------+---------------+
51+
| numpy | 1.18.1 | 1.18.1 |
52+
+--------------------------------+--------------------+---------------+
53+
| pandas | 0.24.2 | 1.0.1 |
54+
+--------------------------------+--------------------+---------------+
55+
| pip | 20.0.2 | 20.0.2 |
56+
+--------------------------------+--------------------+---------------+
57+
| Pillow | 6.2.1 | 7.0.0 |
58+
+--------------------------------+--------------------+---------------+
59+
| Python | 2.7, 3.6 or 3.7 | 2.7 or 3.6 |
60+
+--------------------------------+--------------------+---------------+
61+
| requests | 2.22.0 | 2.22.0 |
62+
+--------------------------------+--------------------+---------------+
63+
| sagemaker-containers | 2.7.0 | 2.8.0 |
64+
+--------------------------------+--------------------+---------------+
65+
| sagemaker-tensorflow-container | 1.15.0.1.1.0 | 2.0.0.1.1.0 |
66+
+--------------------------------+--------------------+---------------+
67+
| scipy | 1.2.2 | 1.4.1 |
68+
+--------------------------------+--------------------+---------------+
69+
| tensorflow | 1.15.2 | 2.1.0 |
70+
+--------------------------------+--------------------+---------------+
7171

7272
Script Mode TensorFlow Docker images support Python 2.7 and Python 3.6, Python 3.7 for TensorFlow version 1.15.2. The Docker images extend Ubuntu 16.04.
7373

tests/integ/test_tf_script_mode.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ def test_mnist_with_checkpoint_config(sagemaker_session, instance_type, tf_full_
5252
sagemaker_session=sagemaker_session,
5353
script_mode=True,
5454
framework_version=tf_full_version,
55-
py_version=tests.integ.PYTHON_VERSION,
55+
py_version="py37"
56+
if tf_full_version == TensorFlow._LATEST_1X_VERSION
57+
else tests.integ.PYTHON_VERSION,
5658
metric_definitions=[{"Name": "train:global_steps", "Regex": r"global_step\/sec:\s(.*)"}],
5759
checkpoint_s3_uri=checkpoint_s3_uri,
5860
checkpoint_local_path=checkpoint_local_path,
@@ -97,7 +99,9 @@ def test_server_side_encryption(sagemaker_session, tf_full_version):
9799
sagemaker_session=sagemaker_session,
98100
script_mode=True,
99101
framework_version=tf_full_version,
100-
py_version=tests.integ.PYTHON_VERSION,
102+
py_version="py37"
103+
if tf_full_version == TensorFlow._LATEST_1X_VERSION
104+
else tests.integ.PYTHON_VERSION,
101105
code_location=output_path,
102106
output_path=output_path,
103107
model_dir="/opt/ml/model",
@@ -151,13 +155,15 @@ def test_mnist_distributed(sagemaker_session, instance_type, tf_full_version):
151155
)
152156

153157

154-
def test_mnist_async(sagemaker_session, cpu_instance_type):
158+
def test_mnist_async(sagemaker_session, cpu_instance_type, tf_full_version):
155159
estimator = TensorFlow(
156160
entry_point=SCRIPT,
157161
role=ROLE,
158162
train_instance_count=1,
159163
train_instance_type="ml.c5.4xlarge",
160-
py_version=tests.integ.PYTHON_VERSION,
164+
py_version="py37"
165+
if tf_full_version == TensorFlow._LATEST_1X_VERSION
166+
else tests.integ.PYTHON_VERSION,
161167
sagemaker_session=sagemaker_session,
162168
script_mode=True,
163169
# testing py-sdk functionality, no need to run against all TF versions
@@ -200,7 +206,9 @@ def test_deploy_with_input_handlers(sagemaker_session, instance_type, tf_full_ve
200206
role=ROLE,
201207
train_instance_count=1,
202208
train_instance_type=instance_type,
203-
py_version=tests.integ.PYTHON_VERSION,
209+
py_version="py37"
210+
if tf_full_version == TensorFlow._LATEST_1X_VERSION
211+
else tests.integ.PYTHON_VERSION,
204212
sagemaker_session=sagemaker_session,
205213
script_mode=True,
206214
framework_version=tf_full_version,

tests/unit/test_fw_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def test_create_image_uri_cn_northwest_1():
298298

299299

300300
def test_create_image_uri_py37_invalid_framework():
301-
error_message = "{} does not support Python 3.7 yet.".format(MOCK_FRAMEWORK)
301+
error_message = "{} does not support Python 3.7 at this time.".format(MOCK_FRAMEWORK)
302302

303303
with pytest.raises(ValueError) as error:
304304
fw_utils.create_image_uri(REGION, MOCK_FRAMEWORK, "ml.m4.xlarge", "1.4.0", "py37")

0 commit comments

Comments
 (0)