Skip to content

Commit 0405c73

Browse files
authored
fix: update documentation link in warning message (#243)
1 parent b16cccc commit 0405c73

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/sagemaker_tensorflow_container/training.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,18 +169,18 @@ def _log_model_missing_warning(model_dir):
169169
pb_file_exists = True
170170
path, direct_parent_dir = os.path.split(dirpath)
171171
if not str.isdigit(direct_parent_dir):
172-
logger.warn('Your model will NOT be servable with SageMaker TensorFlow Serving containers.'
172+
logger.warn('Your model will NOT be servable with SageMaker TensorFlow Serving containers. '
173173
'The SavedModel bundle is under directory \"{}\", not a numeric name.'
174174
.format(direct_parent_dir))
175175

176176
if not file_exists:
177177
logger.warn('No model artifact is saved under path {}.'
178178
' Your training job will not save any model files to S3.\n'
179179
'For details of how to construct your training script see:\n'
180-
'https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/tensorflow#adapting-your-local-tensorflow-script' # noqa
180+
'https://sagemaker.readthedocs.io/en/stable/using_tf.html#adapting-your-local-tensorflow-script'
181181
.format(model_dir))
182182
elif not pb_file_exists:
183-
logger.warn('Your model will NOT be servable with SageMaker TensorFlow Serving container.'
183+
logger.warn('Your model will NOT be servable with SageMaker TensorFlow Serving container. '
184184
'The model artifact was not saved in the TensorFlow SavedModel directory structure:\n'
185185
'https://www.tensorflow.org/guide/saved_model#structure_of_a_savedmodel_directory')
186186

test/unit/test_training.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,14 +209,14 @@ def test_log_model_missing_warning_no_model(logger):
209209
logger.warn.assert_called_with('No model artifact is saved under path {}.'
210210
' Your training job will not save any model files to S3.\n'
211211
'For details of how to construct your training script see:\n'
212-
'https://github.com/aws/sagemaker-python-sdk/tree/master/src/sagemaker/tensorflow#adapting-your-local-tensorflow-script' # noqa
212+
'https://sagemaker.readthedocs.io/en/stable/using_tf.html#adapting-your-local-tensorflow-script' # noqa
213213
.format(path))
214214

215215

216216
@patch('sagemaker_tensorflow_container.training.logger')
217217
def test_log_model_missing_warning_wrong_format(logger):
218218
training._log_model_missing_warning(os.path.join(RESOURCE_PATH, 'test_dir_wrong_model'))
219-
logger.warn.assert_called_with('Your model will NOT be servable with SageMaker TensorFlow Serving container.'
219+
logger.warn.assert_called_with('Your model will NOT be servable with SageMaker TensorFlow Serving container. '
220220
'The model artifact was not saved in the TensorFlow '
221221
'SavedModel directory structure:\n'
222222
'https://www.tensorflow.org/guide/saved_model#structure_of_a_savedmodel_directory')
@@ -225,7 +225,7 @@ def test_log_model_missing_warning_wrong_format(logger):
225225
@patch('sagemaker_tensorflow_container.training.logger')
226226
def test_log_model_missing_warning_wrong_parent_dir(logger):
227227
training._log_model_missing_warning(os.path.join(RESOURCE_PATH, 'test_dir_wrong_parent_dir'))
228-
logger.warn.assert_called_with('Your model will NOT be servable with SageMaker TensorFlow Serving containers.'
228+
logger.warn.assert_called_with('Your model will NOT be servable with SageMaker TensorFlow Serving containers. '
229229
'The SavedModel bundle is under directory \"{}\", not a numeric name.'
230230
.format('not-digit'))
231231

0 commit comments

Comments
 (0)