Skip to content

Commit fcbb7a6

Browse files
committed
doc fix and remove framework mode tests
1 parent b4a6f6c commit fcbb7a6

File tree

7 files changed

+16
-482
lines changed

7 files changed

+16
-482
lines changed

doc/using_tf.rst

+3-13
Original file line numberDiff line numberDiff line change
@@ -443,20 +443,10 @@ After a TensorFlow estimator has been fit, it saves a TensorFlow SavedModel in
443443
the S3 location defined by ``output_path``. You can call ``deploy`` on a TensorFlow
444444
estimator to create a SageMaker Endpoint.
445445

446-
SageMaker provides two different options for deploying TensorFlow models to a SageMaker
447-
Endpoint:
446+
Your model will be deployed to a TensorFlow Serving-based server. The server provides a super-set of the
447+
`TensorFlow Serving REST API <https://www.tensorflow.org/serving/api_rest>`_.
448448

449-
- The first option uses a Python-based server that allows you to specify your own custom
450-
input and output handling functions in a Python script. This is the default option.
451-
452-
See `Deploying to Python-based Endpoints <https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/deploying_python.rst>`_ to learn how to use this option.
453-
454-
455-
- The second option uses a TensorFlow Serving-based server to provide a super-set of the
456-
`TensorFlow Serving REST API <https://www.tensorflow.org/serving/api_rest>`_. This option
457-
does not require (or allow) a custom python script.
458-
459-
See `Deploying to TensorFlow Serving Endpoints <https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/deploying_tensorflow_serving.rst>`_ to learn how to use this option.
449+
See `Deploying to TensorFlow Serving Endpoints <https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/tensorflow/deploying_tensorflow_serving.rst>`_ to learn how to deploy your model and make inference requests.
460450

461451

462452
SageMaker TensorFlow Docker containers

src/sagemaker/tensorflow/deploying_python.rst

-199
This file was deleted.

src/sagemaker/tensorflow/estimator.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
from sagemaker.tensorflow.defaults import TF_VERSION
2727
from sagemaker.tensorflow.model import TensorFlowModel
2828
from sagemaker.tensorflow.serving import Model
29-
from sagemaker.utils import get_config_value, get_short_version
29+
from sagemaker import utils
3030
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT
3131

3232
logger = logging.getLogger("sagemaker")
@@ -502,7 +502,7 @@ def _create_tfs_model(self, role=None, vpc_config_override=VPC_CONFIG_DEFAULT):
502502
image=self.image_name,
503503
name=self._current_job_name,
504504
container_log_level=self.container_log_level,
505-
framework_version=get_short_version(self.framework_version),
505+
framework_version=utils.get_short_version(self.framework_version),
506506
sagemaker_session=self.sagemaker_session,
507507
vpc_config=self.get_vpc_config(vpc_config_override),
508508
)
@@ -566,7 +566,7 @@ def hyperparameters(self):
566566
return hyperparameters
567567

568568
def _default_s3_path(self, directory, mpi=False):
569-
local_code = get_config_value("local.local_code", self.sagemaker_session.config)
569+
local_code = utils.get_config_value("local.local_code", self.sagemaker_session.config)
570570
if self.sagemaker_session.local_mode and local_code:
571571
return "/opt/ml/shared/{}".format(directory)
572572
elif mpi:

tests/integ/test_local_mode.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ def _create_model(output_path):
8585

8686
@pytest.mark.local_mode
8787
@pytest.mark.skipif(PYTHON_VERSION != "py2", reason="TensorFlow image supports only python 2.")
88-
def test_tf_local_mode(tf_full_version, sagemaker_local_session):
88+
def test_tf_local_mode(sagemaker_local_session):
8989
with timeout(minutes=5):
9090
script_path = os.path.join(DATA_DIR, "iris", "iris-dnn-classifier.py")
9191

9292
estimator = TensorFlow(
9393
entry_point=script_path,
9494
role="SageMakerRole",
95-
framework_version=tf_full_version,
95+
framework_version='1.12',
9696
training_steps=1,
9797
evaluation_steps=1,
9898
hyperparameters={"input_tensor_name": "inputs"},
@@ -135,6 +135,7 @@ def test_tf_distributed_local_mode(sagemaker_local_session):
135135
estimator = TensorFlow(
136136
entry_point=script_path,
137137
role="SageMakerRole",
138+
framework_version='1.12',
138139
training_steps=1,
139140
evaluation_steps=1,
140141
hyperparameters={"input_tensor_name": "inputs"},
@@ -176,6 +177,7 @@ def test_tf_local_data(sagemaker_local_session):
176177
estimator = TensorFlow(
177178
entry_point=script_path,
178179
role="SageMakerRole",
180+
framework_version='1.12',
179181
training_steps=1,
180182
evaluation_steps=1,
181183
hyperparameters={"input_tensor_name": "inputs"},
@@ -216,6 +218,7 @@ def test_tf_local_data_local_script():
216218
estimator = TensorFlow(
217219
entry_point=script_path,
218220
role="SageMakerRole",
221+
framework_version='1.12',
219222
training_steps=1,
220223
evaluation_steps=1,
221224
hyperparameters={"input_tensor_name": "inputs"},

0 commit comments

Comments
 (0)