Skip to content

Commit 62a89fe

Browse files
author
Chuyang Deng
committed
fix: add condition to avoid error when 'model_dir' is None
1 parent 9772fe6 commit 62a89fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sagemaker_tensorflow_container/training.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def _log_model_missing_warning(model_dir):
204204

205205

206206
def _model_dir_with_training_job(model_dir, job_name):
207-
if model_dir.startswith("/opt/ml"):
207+
if model_dir and model_dir.startswith("/opt/ml"):
208208
return model_dir
209209
else:
210210
return "{}/{}/model".format(model_dir, job_name)

0 commit comments

Comments
 (0)