Skip to content

Commit e4741b6

Browse files
committed
Update tensorflow_bring_your_own_california_housing_local_serving_without_tfs.py
1 parent b11ef5a commit e4741b6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tensorflow_bring_your_own_california_housing_local_serving_without_tfs/tensorflow_bring_your_own_california_housing_local_serving_without_tfs.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def main():
8484
download_eval_data()
8585

8686
image = 'sagemaker-tensorflow2-no-tfs-local'
87+
endpoint_name = "my-local-endpoint"
8788

8889
role = DUMMY_IAM_ROLE
8990
model_dir = 's3://aws-ml-blog/artifacts/tensorflow-script-mode-no-tfs-inference/model.tar.gz'
@@ -101,18 +102,18 @@ def main():
101102
endpoint = model.deploy(
102103
initial_instance_count=1,
103104
instance_type='local',
104-
endpoint_name="my-local-endpoint"
105+
endpoint_name=endpoint_name
105106
)
106107

107-
predictor = Predictor(endpoint_name="my-local-endpoint",
108+
predictor = Predictor(endpoint_name=endpoint_name,
108109
sagemaker_session=sagemaker_session,
109110
serializer=JSONSerializer(),
110111
deserializer=JSONDeserializer())
111112

112113
do_inference_on_local_endpoint(predictor)
113114

114115
print('About to delete the endpoint to stop paying (if in cloud mode).')
115-
predictor.delete_endpoint(predictor.endpoint_name)
116+
predictor.delete_endpoint()
116117

117118

118119
if __name__ == "__main__":

0 commit comments

Comments
 (0)