File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -104,9 +104,9 @@ def deploy_vpc_template(region):
104
104
vpc_id = None
105
105
subnets = None
106
106
for output in outputs :
107
- if output ["OutputKey" ] == "VPCID" :
107
+ if output ["OutputKey" ] == "VPCID" and output [ "OutputValue" ] :
108
108
vpc_id = output ["OutputValue" ]
109
- elif output ["OutputKey" ] == "Subnets" :
109
+ elif output ["OutputKey" ] == "Subnets" and output [ "OutputValue" ] :
110
110
subnets = output ["OutputValue" ]
111
111
update_parameters_file ("parameters.json" , {"VPCID" : vpc_id , "Subnets" : subnets })
112
112
return vpc_id , subnets
Original file line number Diff line number Diff line change 92
92
"EngineType" :"engine_type" ,
93
93
"Region" : "region" ,
94
94
"DesiredCapacity" : ValueWithDefault (name = "desired_capacity" ,default = 1 ),
95
+ "MaxSize" : ValueWithDefault (name = "max_size" ,default = 1 ),
96
+ "VPCID" : ValueWithDefault (name = "vpc_id" ,default = "" ),
97
+ "Subnets" : ValueWithDefault (name = "subnet_ids" ,default = "" ),
95
98
"ContainerCpu" : "container_cpu" ,
96
99
"ContainerMemory" : "container_memory" ,
97
100
"ContainerGpu" :"instance_gpu_num"
Original file line number Diff line number Diff line change @@ -108,9 +108,7 @@ def run(
108
108
+ "-"
109
109
+ time .strftime ("%Y-%m-%d-%H-%M-%S" )
110
110
)
111
-
112
111
role_arn = get_or_create_role (role_name , region )
113
-
114
112
create_sagemaker_endpoint (
115
113
region = region ,
116
114
instance_type = instance_type ,
You can’t perform that action at this time.
0 commit comments