diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 02b0fae5fe..fccd62449b 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,6 +2,11 @@ CHANGELOG ========= +1.4.1 +===== + +* bug-fix: Local Mode: Fix for non Framework containers + 1.4.0 ===== diff --git a/README.rst b/README.rst index 314af97888..8f0a913b82 100644 --- a/README.rst +++ b/README.rst @@ -48,7 +48,7 @@ You can install from source by cloning this repository and issuing a pip install git clone https://github.com/aws/sagemaker-python-sdk.git python setup.py sdist - pip install dist/sagemaker-1.4.0.tar.gz + pip install dist/sagemaker-1.4.1.tar.gz Supported Python versions ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index 2d7143793c..09bff11b56 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ def read(fname): setup(name="sagemaker", - version="1.4.0", + version="1.4.1", description="Open source library for training and deploying models on Amazon SageMaker.", packages=find_packages('src'), package_dir={'': 'src'}, diff --git a/src/sagemaker/local/image.py b/src/sagemaker/local/image.py index d2dc232058..f4a6d74837 100644 --- a/src/sagemaker/local/image.py +++ b/src/sagemaker/local/image.py @@ -309,13 +309,15 @@ def _prepare_training_volumes(self, data_dir, input_data_config, hyperparameters else: raise ValueError('Unknown URI scheme {}'.format(parsed_uri.scheme)) - # If the training script directory is a local directory, mount it to the container. - training_dir = json.loads(hyperparameters[sagemaker.estimator.DIR_PARAM_NAME]) - parsed_uri = urlparse(training_dir) - if parsed_uri.scheme == 'file': - volumes.append(_Volume(parsed_uri.path, '/opt/ml/code')) - # Also mount a directory that all the containers can access. - volumes.append(_Volume(shared_dir, '/opt/ml/shared')) + # If there is a training script directory and it is a local directory, + # mount it to the container. + if sagemaker.estimator.DIR_PARAM_NAME in hyperparameters: + training_dir = json.loads(hyperparameters[sagemaker.estimator.DIR_PARAM_NAME]) + parsed_uri = urlparse(training_dir) + if parsed_uri.scheme == 'file': + volumes.append(_Volume(parsed_uri.path, '/opt/ml/code')) + # Also mount a directory that all the containers can access. + volumes.append(_Volume(shared_dir, '/opt/ml/shared')) return volumes