Skip to content

move sagemaker_s3_output to model class #560

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ CHANGELOG

* bug-fix: Append retry id to default Airflow job name to avoid name collisions in retry
* bug-fix: Local Mode: No longer requires s3 permissions to run local entry point file
* bug-fix: Local Mode: Move dependency on sagemaker_s3_output from rl.estimator to model

1.16.2
======
Expand Down
3 changes: 1 addition & 2 deletions src/sagemaker/local/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,7 @@ def _prepare_training_volumes(self, data_dir, input_data_config, output_data_con
volumes.append(_Volume(shared_dir, '/opt/ml/shared'))

parsed_uri = urlparse(output_data_config['S3OutputPath'])
if parsed_uri.scheme == 'file' \
and sagemaker.rl.estimator.SAGEMAKER_OUTPUT_LOCATION in hyperparameters:
if parsed_uri.scheme == 'file' and sagemaker.model.SAGEMAKER_OUTPUT_LOCATION in hyperparameters:
intermediate_dir = os.path.join(parsed_uri.path, 'output', 'intermediate')
if not os.path.exists(intermediate_dir):
os.makedirs(intermediate_dir)
Expand Down
1 change: 1 addition & 0 deletions src/sagemaker/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ def deploy(self, initial_instance_count, instance_type, accelerator_type=None, e
JOB_NAME_PARAM_NAME = 'sagemaker_job_name'
MODEL_SERVER_WORKERS_PARAM_NAME = 'sagemaker_model_server_workers'
SAGEMAKER_REGION_PARAM_NAME = 'sagemaker_region'
SAGEMAKER_OUTPUT_LOCATION = 'sagemaker_s3_output'


class FrameworkModel(Model):
Expand Down
3 changes: 1 addition & 2 deletions src/sagemaker/rl/estimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from sagemaker.estimator import Framework
import sagemaker.fw_utils as fw_utils
from sagemaker.model import FrameworkModel
from sagemaker.model import FrameworkModel, SAGEMAKER_OUTPUT_LOCATION
from sagemaker.mxnet.model import MXNetModel
from sagemaker.vpc_utils import VPC_CONFIG_DEFAULT

Expand All @@ -27,7 +27,6 @@

SAGEMAKER_ESTIMATOR = 'sagemaker_estimator'
SAGEMAKER_ESTIMATOR_VALUE = 'RLEstimator'
SAGEMAKER_OUTPUT_LOCATION = 'sagemaker_s3_output'
PYTHON_VERSION = 'py3'
TOOLKIT_FRAMEWORK_VERSION_MAP = {
'coach': {
Expand Down