Skip to content

Commit

Permalink
fix: add condition to avoid error when 'model_dir' is None (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
yijiezh authored Oct 14, 2020
1 parent ae8703c commit d2e8848
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sagemaker_tensorflow_container/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _log_model_missing_warning(model_dir):


def _model_dir_with_training_job(model_dir, job_name):
if model_dir.startswith("/opt/ml"):
if model_dir and model_dir.startswith("/opt/ml"):
return model_dir
else:
return "{}/{}/model".format(model_dir, job_name)
Expand Down

0 comments on commit d2e8848

Please sign in to comment.