File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/sagemaker_pytorch_serving_container Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,13 @@ def start_torchserve(handler_service=DEFAULT_HANDLER_SERVICE):
90
90
TS_CONFIG_FILE ,
91
91
"--log-config" ,
92
92
DEFAULT_TS_LOG_FILE ,
93
- "--models" ,
94
- DEFAULT_TS_MODEL_NAME + "=" + environment .model_dir
95
93
]
96
94
95
+ default_model_path_args = ["--models" , DEFAULT_TS_MODEL_NAME + "=" + environment .model_dir ]
96
+
97
+ if not ENABLE_MULTI_MODEL :
98
+ ts_torchserve_cmd += default_model_path_args
99
+
97
100
print (ts_torchserve_cmd )
98
101
99
102
logger .info (ts_torchserve_cmd )
@@ -138,7 +141,7 @@ def _generate_ts_config_properties(handler_service):
138
141
if ts_env .is_env_set () and not ENABLE_MULTI_MODEL :
139
142
models_string = f'''{{\\
140
143
"{ DEFAULT_TS_MODEL_NAME } ": {{\\
141
- "1.0 ": {{\\
144
+ "1": {{\\
142
145
"defaultVersion": true,\\
143
146
"marName": "{ DEFAULT_TS_MODEL_NAME } .mar",\\
144
147
"minWorkers": { ts_env ._min_workers } ,\\
You can’t perform that action at this time.
0 commit comments