Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
" role=role,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.c4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" py_version='py2',\n",
" distributions={'parameter_server': {'enabled': True}},\n",
" hyperparameters={'batch-size': 8,\n",
Expand Down Expand Up @@ -199,7 +199,7 @@
"metadata": {},
"outputs": [],
"source": [
"sagemaker.Session().delete_endpoint(predictor.endpoint)"
"predictor.delete_endpoint()"
]
}
],
Expand Down
4 changes: 1 addition & 3 deletions sagemaker-python-sdk/mxnet_gluon_sentiment/sentiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
from mxnet.io import DataIter, DataBatch, DataDesc
import numpy as np

from sagemaker_mxnet_container.training_utils import scheduler_host


logging.basicConfig(level=logging.DEBUG)

Expand Down Expand Up @@ -337,7 +335,7 @@ def parse_args():
model = train(args.current_host, args.hosts, num_cpus, num_gpus, args.training_channel, args.model_dir,
args.batch_size, args.epochs, args.learning_rate, args.log_interval, args.embedding_size)

if args.current_host == scheduler_host(args.hosts):
if args.current_host == args.hosts[0]:
save(model, args.model_dir)


Expand Down
4 changes: 1 addition & 3 deletions sagemaker-python-sdk/mxnet_mnist/mnist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
import mxnet as mx
import numpy as np

from sagemaker_mxnet_container.training_utils import scheduler_host


def load_data(path):
with gzip.open(find_file(path, "labels.gz")) as flbl:
Expand Down Expand Up @@ -79,7 +77,7 @@ def train(batch_size, epochs, learning_rate, num_gpus, training_channel, testing
batch_end_callback=mx.callback.Speedometer(batch_size, 100),
num_epoch=epochs)

if current_host == scheduler_host(hosts):
if current_host == hosts[0]:
save(model_dir, mlp_model)


Expand Down
4 changes: 2 additions & 2 deletions sagemaker-python-sdk/mxnet_mnist/mxnet_mnist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
" code_location=custom_code_upload_location,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.m4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" distributions={'parameter_server': {'enabled': True}},\n",
" hyperparameters={'learning-rate': 0.1})"
]
Expand Down Expand Up @@ -231,7 +231,7 @@
"source": [
"import sagemaker\n",
"\n",
"sagemaker.Session().delete_endpoint(predictor.endpoint)"
"predictor.delete_endpoint()"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" role=role,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.m4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" hyperparameters={'learning-rate': 0.1})"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
" role=role,\n",
" train_instance_count=1,\n",
" train_instance_type='local',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" hyperparameters={'learning-rate': 0.1})"
]
},
Expand Down
4 changes: 2 additions & 2 deletions sagemaker-python-sdk/mxnet_mnist/mxnet_mnist_neo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
" code_location=custom_code_upload_location,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.m4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" distributions={'parameter_server': {'enabled': True}},\n",
" hyperparameters={'learning-rate': 0.1})"
]
Expand Down Expand Up @@ -283,7 +283,7 @@
"outputs": [],
"source": [
"import sagemaker\n",
"sagemaker.Session().delete_endpoint(predictor.endpoint)"
"predictor.delete_endpoint()"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
" code_location=custom_code_upload_location,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.m4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" hyperparameters={'learning-rate': 0.1})"
]
},
Expand Down
4 changes: 2 additions & 2 deletions sagemaker-python-sdk/mxnet_onnx_eia/mxnet_onnx_eia.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"* `model_data`: the S3 location of the model data\n",
"* `entry_point`: the script for model hosting that we looked at above\n",
"* `role`: the IAM role used\n",
"* `framework_version`: the MXNet version in use, in this case '1.3.0'\n",
"* `framework_version`: the MXNet version in use, in this case '1.4.0'\n",
"\n",
"You can read more about creating an `MXNetModel` object in the [SageMaker Python SDK API docs](https://sagemaker.readthedocs.io/en/latest/sagemaker.mxnet.html#mxnet-model)."
]
Expand All @@ -149,7 +149,7 @@
"mxnet_model = MXNetModel(model_data=model_data,\n",
" entry_point='resnet152.py',\n",
" role=role,\n",
" framework_version='1.3.0')"
" framework_version='1.4.0')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
" code_location=custom_code_upload_location,\n",
" train_instance_count=1,\n",
" train_instance_type='ml.m4.xlarge',\n",
" framework_version='1.3.0',\n",
" framework_version='1.4.0',\n",
" hyperparameters={'learning-rate': 0.1})\n",
"\n",
"train_data_location = 's3://sagemaker-sample-data-{}/mxnet/mnist/train'.format(region)\n",
Expand Down