Skip to content

Instantly share code, notes, and snippets.

@juliensimon
Last active December 9, 2018 14:13
Show Gist options
  • Select an option

  • Save juliensimon/9d571ed98862c038e91d5f4a0e1cbcbc to your computer and use it in GitHub Desktop.

Select an option

Save juliensimon/9d571ed98862c038e91d5f4a0e1cbcbc to your computer and use it in GitHub Desktop.
smdeploy-1.py
job_name_prefix = 'DEMO-imageclassification'
timestamp = time.strftime('-%Y-%m-%d-%H-%M-%S', time.gmtime())
endpoint_config_name = job_name_prefix + '-epc-' + timestamp
endpoint_config_response = sagemaker.create_endpoint_config(
EndpointConfigName = endpoint_config_name,
ProductionVariants=[
{
'InstanceType':'ml.m4.xlarge',
'InitialInstanceCount':1,
'ModelName':job_name_modela,
'VariantName':'Model-A',
'InitialVariantWeight':1
},
{
'InstanceType':'ml.m4.xlarge',
'InitialInstanceCount':1,
'ModelName':job_name_modelb,
'VariantName':'Model-B',
'InitialVariantWeight':1
}
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment