Skip to content

Commit

Permalink
Updated: Moved most notebooks to host on ml.m4.xlarge to be eligible …
Browse files Browse the repository at this point in the history
…for free tier
  • Loading branch information
djarpin committed Dec 12, 2017
1 parent 988f6b4 commit 23bc1bd
Show file tree
Hide file tree
Showing 28 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@
"sharded_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName=sharded_endpoint_config,\n",
" ProductionVariants=[{\n",
" 'InstanceType': 'ml.c4.2xlarge',\n",
" 'InstanceType': 'ml.m4.xlarge',\n",
" 'InitialInstanceCount': 1,\n",
" 'ModelName': sharded_job,\n",
" 'VariantName': 'AllTraffic'}])\n",
Expand All @@ -536,7 +536,7 @@
"replicated_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName=replicated_endpoint_config,\n",
" ProductionVariants=[{\n",
" 'InstanceType': 'ml.c4.2xlarge',\n",
" 'InstanceType': 'ml.m4.xlarge',\n",
" 'InitialInstanceCount': 1,\n",
" 'ModelName': replicated_job,\n",
" 'VariantName': 'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@
"create_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName=kmeans_endpoint_config,\n",
" ProductionVariants=[{\n",
" 'InstanceType': 'ml.c4.xlarge',\n",
" 'InstanceType': 'ml.m4.xlarge',\n",
" 'InitialInstanceCount': 1,\n",
" 'ModelName': kmeans_model,\n",
" 'VariantName': 'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@
"outputs": [],
"source": [
"from sagemaker.predictor import csv_serializer\n",
"predictor = tree.deploy(1, 'ml.c4.xlarge', serializer=csv_serializer)"
"predictor = tree.deploy(1, 'ml.m4.xlarge', serializer=csv_serializer)"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
"source": [
"### Create endpoint\n",
"\n",
"Now the model is ready to be deployed at a SageMaker endpoint. We can use the ``sagemaker.mxnet.model.TensorFlowModel.deploy`` method to do this. Unless you have created or prefer other instances, we recommend using 1 ``'ml.c4.xlarge'`` instance for this example. These are supplied as arguments. "
"Now the model is ready to be deployed at a SageMaker endpoint. We can use the ``sagemaker.mxnet.model.TensorFlowModel.deploy`` method to do this. Unless you have created or prefer other instances, we recommend using 1 ``'ml.m4.xlarge'`` instance for this example. These are supplied as arguments. "
]
},
{
Expand All @@ -254,7 +254,7 @@
"source": [
"%%time\n",
"predictor = sagemaker_model.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"outputs": [],
"source": [
"fm_predictor = fm.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
"endpoint_config_response = sage.create_endpoint_config(\n",
" EndpointConfigName = endpoint_config_name,\n",
" ProductionVariants=[{\n",
" 'InstanceType':'ml.p2.xlarge',\n",
" 'InstanceType':'ml.m4.xlarge',\n",
" 'InitialInstanceCount':1,\n",
" 'ModelName':model_name,\n",
" 'VariantName':'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@
"endpoint_config_response = sage.create_endpoint_config(\n",
" EndpointConfigName = endpoint_config_name,\n",
" ProductionVariants=[{\n",
" 'InstanceType':'ml.p2.xlarge',\n",
" 'InstanceType':'ml.m4.xlarge',\n",
" 'InitialInstanceCount':1,\n",
" 'ModelName':model_name,\n",
" 'VariantName':'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@
"source": [
"lda_inference = lda.deploy(\n",
" initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge', # LDA inference works best on ml.c4 instances\n",
" instance_type='ml.m4.xlarge', # LDA inference may work better at scale on ml.c4 instances\n",
")"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@
"outputs": [],
"source": [
"linear_predictor = linear.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
"outputs": [],
"source": [
"ntm_predictor = ntm.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"outputs": [],
"source": [
"pca_predictor = pca.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@
"### Create endpoint configuration\n",
"Use the model to create an endpoint configuration. The endpoint configuration also contains information about the type and number of EC2 instances to use when hosting the model.\n",
"\n",
"Since SageMaker Seq2Seq is based on Neural Nets, we will use an ml.p2.xlarge (GPU) instance in this example."
"Since SageMaker Seq2Seq is based on Neural Nets, we could use an ml.p2.xlarge (GPU) instance, but for this example we will use a free tier eligible ml.m4.xlarge."
]
},
{
Expand All @@ -477,7 +477,7 @@
"create_endpoint_config_response = sage.create_endpoint_config(\n",
" EndpointConfigName = endpoint_config_name,\n",
" ProductionVariants=[{\n",
" 'InstanceType':'ml.p2.xlarge',\n",
" 'InstanceType':'ml.m4.xlarge',\n",
" 'InitialInstanceCount':1,\n",
" 'ModelName':model_name,\n",
" 'VariantName':'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@
"create_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName = endpoint_config_name,\n",
" ProductionVariants=[{\n",
" 'InstanceType':'ml.c4.xlarge',\n",
" 'InstanceType':'ml.m4.xlarge',\n",
" 'InitialVariantWeight':1,\n",
" 'InitialInstanceCount':1,\n",
" 'ModelName':model_name,\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@
"create_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName=linear_endpoint_config,\n",
" ProductionVariants=[{\n",
" 'InstanceType': 'ml.c4.2xlarge',\n",
" 'InstanceType': 'ml.m4.xlarge',\n",
" 'InitialInstanceCount': 1,\n",
" 'ModelName': linear_job,\n",
" 'VariantName': 'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -942,7 +942,7 @@
"create_endpoint_config_response = sm.create_endpoint_config(\n",
" EndpointConfigName=linear_endpoint_config,\n",
" ProductionVariants=[{\n",
" 'InstanceType': 'ml.c4.2xlarge',\n",
" 'InstanceType': 'ml.m4.xlarge',\n",
" 'InitialInstanceCount': 1,\n",
" 'ModelName': linear_job,\n",
" 'VariantName': 'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
"outputs": [],
"source": [
"linear_predictor = linear.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@
"outputs": [],
"source": [
"xgb_predictor = xgb.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@
"outputs": [],
"source": [
"xgb_predictor = xgb.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
"%%time\n",
"\n",
"kmeans_predictor = kmeans.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@
"create_endpoint_config_response = sagemaker.create_endpoint_config(\n",
" EndpointConfigName = endpoint_config_name,\n",
" ProductionVariants=[{\n",
" 'InstanceType':'ml.c4.xlarge',\n",
" 'InstanceType':'ml.m4.xlarge',\n",
" 'InitialInstanceCount':3,\n",
" 'ModelName':model_name,\n",
" 'VariantName':'AllTraffic'}])\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
},
"outputs": [],
"source": [
"predictor = m.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')"
"predictor = m.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')"
]
},
{
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 @@ -132,7 +132,7 @@
"\n",
"After training, we use the ``MXNet estimator`` object to build and deploy an ``MXNetPredictor``. This creates a Sagemaker **Endpoint** -- a hosted prediction service that we can use to perform inference. \n",
"\n",
"The arguments to the ``deploy`` function allow us to set the number and type of instances that will be used for the Endpoint. These do not need to be the same as the values we used for the training job. For example, you can train a model on a set of GPU-based instances, and then deploy the Endpoint to a fleet of CPU-based instances. Here we will deploy the model to a single ``ml.c4.xlarge`` instance."
"The arguments to the ``deploy`` function allow us to set the number and type of instances that will be used for the Endpoint. These do not need to be the same as the values we used for the training job. For example, you can train a model on a set of GPU-based instances, and then deploy the Endpoint to a fleet of CPU-based instances. Here we will deploy the model to a single ``ml.m4.xlarge`` instance."
]
},
{
Expand All @@ -144,7 +144,7 @@
"%%time\n",
"\n",
"predictor = mnist_estimator.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@
},
"outputs": [],
"source": [
"abalone_predictor = abalone_estimator.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')"
"abalone_predictor = abalone_estimator.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
},
"outputs": [],
"source": [
"abalone_predictor = abalone_estimator.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')"
"abalone_predictor = abalone_estimator.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
"outputs": [],
"source": [
"mnist_predictor = mnist_estimator.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@
"source": [
"%%time\n",
"iris_predictor = iris_estimator.deploy(initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge')"
" instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
},
"outputs": [],
"source": [
"predictor = estimator.deploy(initial_instance_count=1, instance_type='ml.c4.xlarge')"
"predictor = estimator.deploy(initial_instance_count=1, instance_type='ml.m4.xlarge')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,7 @@
"source": [
"lda_inference = lda.deploy(\n",
" initial_instance_count=1,\n",
" instance_type='ml.c4.xlarge', # LDA inference works best on ml.c4 instances\n",
" instance_type='ml.m4.xlarge', # LDA inference may work better at scale on ml.c4 instances\n",
")"
]
},
Expand Down

0 comments on commit 23bc1bd

Please sign in to comment.